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
TestCredentialIssue.test_deserialize
(self, mock_credential_issue_schema_load)
Test deserialize
Test deserialize
def test_deserialize(self, mock_credential_issue_schema_load): """ Test deserialize """ obj = self.cred_issue credential_issue = CredentialIssue.deserialize(obj) mock_credential_issue_schema_load.assert_called_once_with(obj) assert credential_issue is mock_crede...
[ "def", "test_deserialize", "(", "self", ",", "mock_credential_issue_schema_load", ")", ":", "obj", "=", "self", ".", "cred_issue", "credential_issue", "=", "CredentialIssue", ".", "deserialize", "(", "obj", ")", "mock_credential_issue_schema_load", ".", "assert_called_o...
[ 106, 4 ]
[ 115, 81 ]
python
en
['en', 'error', 'th']
False
TestCredentialIssue.test_serialize
(self, mock_credential_issue_schema_dump)
Test serialization.
Test serialization.
def test_serialize(self, mock_credential_issue_schema_dump): """ Test serialization. """ obj = self.cred_issue credential_issue_dict = obj.serialize() mock_credential_issue_schema_dump.assert_called_once_with(obj) assert credential_issue_dict is mock_credential_...
[ "def", "test_serialize", "(", "self", ",", "mock_credential_issue_schema_dump", ")", ":", "obj", "=", "self", ".", "cred_issue", "credential_issue_dict", "=", "obj", ".", "serialize", "(", ")", "mock_credential_issue_schema_dump", ".", "assert_called_once_with", "(", ...
[ 120, 4 ]
[ 129, 86 ]
python
en
['en', 'error', 'th']
False
TestCredentialIssueSchema.test_make_model
(self)
Test making model.
Test making model.
def test_make_model(self): """Test making model.""" data = self.credential_issue.serialize() model_instance = CredentialIssue.deserialize(data) assert isinstance(model_instance, CredentialIssue)
[ "def", "test_make_model", "(", "self", ")", ":", "data", "=", "self", ".", "credential_issue", ".", "serialize", "(", ")", "model_instance", "=", "CredentialIssue", ".", "deserialize", "(", "data", ")", "assert", "isinstance", "(", "model_instance", ",", "Cred...
[ 140, 4 ]
[ 144, 58 ]
python
en
['en', 'no', 'en']
True
compare_opts
(opt_path_1: str, opt_path_2: str, load_raw: bool = False)
Super simple script to compare the contents of two .opt files. Return the formatted text comparing the two .opts, for printing.
Super simple script to compare the contents of two .opt files.
def compare_opts(opt_path_1: str, opt_path_2: str, load_raw: bool = False) -> str: """ Super simple script to compare the contents of two .opt files. Return the formatted text comparing the two .opts, for printing. """ # Loading opt files if load_raw: with open(opt_path_1) as f1: ...
[ "def", "compare_opts", "(", "opt_path_1", ":", "str", ",", "opt_path_2", ":", "str", ",", "load_raw", ":", "bool", "=", "False", ")", "->", "str", ":", "# Loading opt files", "if", "load_raw", ":", "with", "open", "(", "opt_path_1", ")", "as", "f1", ":",...
[ 12, 0 ]
[ 69, 29 ]
python
en
['en', 'error', 'th']
False
retrieve
(sha1, **kwargs)
Retrieve the most up-to-date copy of the plot-schema wrt the given hash. :param (str) sha1: The last-known hash of the plot-schema (or ''). :returns: (requests.Response) Returns response directly from requests.
Retrieve the most up-to-date copy of the plot-schema wrt the given hash.
def retrieve(sha1, **kwargs): """ Retrieve the most up-to-date copy of the plot-schema wrt the given hash. :param (str) sha1: The last-known hash of the plot-schema (or ''). :returns: (requests.Response) Returns response directly from requests. """ url = build_url(RESOURCE) params = make_p...
[ "def", "retrieve", "(", "sha1", ",", "*", "*", "kwargs", ")", ":", "url", "=", "build_url", "(", "RESOURCE", ")", "params", "=", "make_params", "(", "sha1", "=", "sha1", ")", "return", "request", "(", "\"get\"", ",", "url", ",", "params", "=", "param...
[ 8, 0 ]
[ 18, 55 ]
python
en
['en', 'error', 'th']
False
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.treemap.Textfont` color col...
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
_compare_figures
(go_trace, px_fig)
Compare a figure created with a go trace and a figure created with a px function call. Check that all values inside the go Figure are the same in the px figure (which sets more parameters).
Compare a figure created with a go trace and a figure created with a px function call. Check that all values inside the go Figure are the same in the px figure (which sets more parameters).
def _compare_figures(go_trace, px_fig): """Compare a figure created with a go trace and a figure created with a px function call. Check that all values inside the go Figure are the same in the px figure (which sets more parameters). """ go_fig = go.Figure(go_trace) go_fig = go_fig.to_plotly_json...
[ "def", "_compare_figures", "(", "go_trace", ",", "px_fig", ")", ":", "go_fig", "=", "go", ".", "Figure", "(", "go_trace", ")", "go_fig", "=", "go_fig", ".", "to_plotly_json", "(", ")", "px_fig", "=", "px_fig", ".", "to_plotly_json", "(", ")", "del", "go_...
[ 8, 0 ]
[ 21, 61 ]
python
en
['en', 'en', 'en']
True
KPCNN.loss
(self, outputs, labels)
Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss
Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss
def loss(self, outputs, labels): """ Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss """ # Cross entropy loss self.output_loss = self.criterion(outputs, labels) # Regularization of deformable offse...
[ "def", "loss", "(", "self", ",", "outputs", ",", "labels", ")", ":", "# Cross entropy loss", "self", ".", "output_loss", "=", "self", ".", "criterion", "(", "outputs", ",", "labels", ")", "# Regularization of deformable offsets", "if", "self", ".", "deform_fitti...
[ 150, 4 ]
[ 170, 47 ]
python
en
['en', 'error', 'th']
False
KPCNN.accuracy
(outputs, labels)
Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value
Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value
def accuracy(outputs, labels): """ Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value """ predicted = torch.argmax(outputs.data, dim=1) total = labels.size(0) correc...
[ "def", "accuracy", "(", "outputs", ",", "labels", ")", ":", "predicted", "=", "torch", ".", "argmax", "(", "outputs", ".", "data", ",", "dim", "=", "1", ")", "total", "=", "labels", ".", "size", "(", "0", ")", "correct", "=", "(", "predicted", "=="...
[ 173, 4 ]
[ 185, 30 ]
python
en
['en', 'error', 'th']
False
KPFCNN.loss
(self, outputs, labels)
Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss
Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss
def loss(self, outputs, labels): """ Runs the loss on outputs of the model :param outputs: logits :param labels: labels :return: loss """ # Set all ignored labels to -1 and correct the other label to be in [0, C-1] range target = - torch.ones_like(labels)...
[ "def", "loss", "(", "self", ",", "outputs", ",", "labels", ")", ":", "# Set all ignored labels to -1 and correct the other label to be in [0, C-1] range", "target", "=", "-", "torch", ".", "ones_like", "(", "labels", ")", "for", "i", ",", "c", "in", "enumerate", "...
[ 344, 4 ]
[ 374, 47 ]
python
en
['en', 'error', 'th']
False
KPFCNN.accuracy
(self, outputs, labels)
Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value
Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value
def accuracy(self, outputs, labels): """ Computes accuracy of the current batch :param outputs: logits predicted by the network :param labels: labels :return: accuracy value """ # Set all ignored labels to -1 and correct the other label to be in [0, C-1] range ...
[ "def", "accuracy", "(", "self", ",", "outputs", ",", "labels", ")", ":", "# Set all ignored labels to -1 and correct the other label to be in [0, C-1] range", "target", "=", "-", "torch", ".", "ones_like", "(", "labels", ")", "for", "i", ",", "c", "in", "enumerate",...
[ 376, 4 ]
[ 393, 30 ]
python
en
['en', 'error', 'th']
False
obfuscate_language
(text, level=0.0, language="default")
Main access method for the language parser. Args: text (str): Text to obfuscate. level (real, optional): A value from 0.0-1.0 determining the level of obfuscation where 0 means no jobfuscation (string returned unchanged) and 1.0 means the entire string is ob...
Main access method for the language parser.
def obfuscate_language(text, level=0.0, language="default"): """ Main access method for the language parser. Args: text (str): Text to obfuscate. level (real, optional): A value from 0.0-1.0 determining the level of obfuscation where 0 means no jobfuscation (string r...
[ "def", "obfuscate_language", "(", "text", ",", "level", "=", "0.0", ",", "language", "=", "\"default\"", ")", ":", "# initialize the language handler and cache it", "global", "_LANGUAGE_HANDLER", "if", "not", "_LANGUAGE_HANDLER", ":", "try", ":", "_LANGUAGE_HANDLER", ...
[ 406, 0 ]
[ 432, 76 ]
python
en
['en', 'error', 'th']
False
add_language
(**kwargs)
Access function to creating a new language. See the docstring of `LanguageHandler.add` for list of keyword arguments.
Access function to creating a new language. See the docstring of `LanguageHandler.add` for list of keyword arguments.
def add_language(**kwargs): """ Access function to creating a new language. See the docstring of `LanguageHandler.add` for list of keyword arguments. """ global _LANGUAGE_HANDLER if not _LANGUAGE_HANDLER: try: _LANGUAGE_HANDLER = LanguageHandler.objects.get(db_key="language_...
[ "def", "add_language", "(", "*", "*", "kwargs", ")", ":", "global", "_LANGUAGE_HANDLER", "if", "not", "_LANGUAGE_HANDLER", ":", "try", ":", "_LANGUAGE_HANDLER", "=", "LanguageHandler", ".", "objects", ".", "get", "(", "db_key", "=", "\"language_handler\"", ")", ...
[ 435, 0 ]
[ 449, 35 ]
python
en
['en', 'error', 'th']
False
available_languages
()
Returns all available language keys. Returns: languages (list): List of key strings of all available languages.
Returns all available language keys.
def available_languages(): """ Returns all available language keys. Returns: languages (list): List of key strings of all available languages. """ global _LANGUAGE_HANDLER if not _LANGUAGE_HANDLER: try: _LANGUAGE_HANDLER = LanguageHandler.objects.get(db_key="...
[ "def", "available_languages", "(", ")", ":", "global", "_LANGUAGE_HANDLER", "if", "not", "_LANGUAGE_HANDLER", ":", "try", ":", "_LANGUAGE_HANDLER", "=", "LanguageHandler", ".", "objects", ".", "get", "(", "db_key", "=", "\"language_handler\"", ")", "except", "Lang...
[ 452, 0 ]
[ 468, 73 ]
python
en
['en', 'error', 'th']
False
obfuscate_whisper
(whisper, level=0.0)
Obfuscate whisper depending on a pre-calculated level (that may depend on distance, listening skill etc) Args: whisper (str): The whisper string to obscure. The entire string will be considered in the obscuration. level (real, optional): This is a value 0-1, where 0 ...
Obfuscate whisper depending on a pre-calculated level (that may depend on distance, listening skill etc)
def obfuscate_whisper(whisper, level=0.0): """ Obfuscate whisper depending on a pre-calculated level (that may depend on distance, listening skill etc) Args: whisper (str): The whisper string to obscure. The entire string will be considered in the obscuration. level (real, o...
[ "def", "obfuscate_whisper", "(", "whisper", ",", "level", "=", "0.0", ")", ":", "level", "=", "min", "(", "max", "(", "0.0", ",", "level", ")", ",", "1.0", ")", "olevel", "=", "int", "(", "13.0", "*", "level", ")", "return", "_RE_WHISPER_OBSCURE", "[...
[ 503, 0 ]
[ 518, 85 ]
python
en
['en', 'error', 'th']
False
LanguageHandler.at_script_creation
(self)
Called when script is first started
Called when script is first started
def at_script_creation(self): "Called when script is first started" self.key = "language_handler" self.persistent = True self.db.language_storage = {}
[ "def", "at_script_creation", "(", "self", ")", ":", "self", ".", "key", "=", "\"language_handler\"", "self", ".", "persistent", "=", "True", "self", ".", "db", ".", "language_storage", "=", "{", "}" ]
[ 157, 4 ]
[ 161, 37 ]
python
en
['en', 'en', 'en']
True
LanguageHandler.add
(self, key="default", phonemes=_PHONEMES, grammar=_GRAMMAR, word_length_variance=0, noun_translate=False, noun_prefix="", noun_postfix="", vowels=_VOWELS, manual_translations=None, auto_translations=None, force=False)
Add a new language. Note that you generally only need to do this once per language and that adding an existing language will re-initialize all the random components to new permanent values. Args: key (str, optional): The name of the language. This wi...
Add a new language. Note that you generally only need to do this once per language and that adding an existing language will re-initialize all the random components to new permanent values.
def add(self, key="default", phonemes=_PHONEMES, grammar=_GRAMMAR, word_length_variance=0, noun_translate=False, noun_prefix="", noun_postfix="", vowels=_VOWELS, manual_translations=None, auto_translations=None, force=False): """ Ad...
[ "def", "add", "(", "self", ",", "key", "=", "\"default\"", ",", "phonemes", "=", "_PHONEMES", ",", "grammar", "=", "_GRAMMAR", ",", "word_length_variance", "=", "0", ",", "noun_translate", "=", "False", ",", "noun_prefix", "=", "\"\"", ",", "noun_postfix", ...
[ 163, 4 ]
[ 289, 47 ]
python
en
['en', 'error', 'th']
False
LanguageHandler._translate_sub
(self, match)
Replacer method called by re.sub when traversing the language string. Args: match (re.matchobj): Match object from regex. Returns: converted word. Notes: Assumes self.lastword and self.level is available on the object.
Replacer method called by re.sub when traversing the language string.
def _translate_sub(self, match): """ Replacer method called by re.sub when traversing the language string. Args: match (re.matchobj): Match object from regex. Returns: converted word. Notes: Assumes self.lastword and self.level is ava...
[ "def", "_translate_sub", "(", "self", ",", "match", ")", ":", "word", "=", "match", ".", "group", "(", ")", "lword", "=", "len", "(", "word", ")", "if", "len", "(", "word", ")", "<=", "self", ".", "level", ":", "# below level. Don't translate", "new_wo...
[ 291, 4 ]
[ 368, 23 ]
python
en
['en', 'error', 'th']
False
LanguageHandler.translate
(self, text, level=0.0, language="default")
Translate the text according to the given level. Args: text (str): The text to translate level (real): Value between 0.0 and 1.0, where 0.0 means no obfuscation (text returned unchanged) and 1.0 means full conversion of every word. The closer to ...
Translate the text according to the given level.
def translate(self, text, level=0.0, language="default"): """ Translate the text according to the given level. Args: text (str): The text to translate level (real): Value between 0.0 and 1.0, where 0.0 means no obfuscation (text returned unchanged) and ...
[ "def", "translate", "(", "self", ",", "text", ",", "level", "=", "0.0", ",", "language", "=", "\"default\"", ")", ":", "if", "level", "==", "0.0", ":", "# no translation", "return", "text", "language", "=", "self", ".", "db", ".", "language_storage", "."...
[ 370, 4 ]
[ 398, 51 ]
python
en
['en', 'error', 'th']
False
buffer_carbohydrates_amount
(crop_states: CropStates, climate_states: ClimateStates)
Equation 9.1 carbohydrate_amount_Buf = carbohydrate_flow_AirBuf − carbohydrate_flow_BufFruit − carbohydrate_flow_BufLeaf − carbohydrate_flow_BufStem − carbohydrate_flow_BufAir Returns: The evolution of the carbohydrates in the buffer [mg m^-2 s^-1]
Equation 9.1 carbohydrate_amount_Buf = carbohydrate_flow_AirBuf − carbohydrate_flow_BufFruit − carbohydrate_flow_BufLeaf − carbohydrate_flow_BufStem − carbohydrate_flow_BufAir Returns: The evolution of the carbohydrates in the buffer [mg m^-2 s^-1]
def buffer_carbohydrates_amount(crop_states: CropStates, climate_states: ClimateStates): """ Equation 9.1 carbohydrate_amount_Buf = carbohydrate_flow_AirBuf − carbohydrate_flow_BufFruit − carbohydrate_flow_BufLeaf − carbohydrate_flow_BufStem − carbohydrate_flow_BufAir Returns: The evolution of...
[ "def", "buffer_carbohydrates_amount", "(", "crop_states", ":", "CropStates", ",", "climate_states", ":", "ClimateStates", ")", ":", "carbohydrate_flow_AirBuf", "=", "net_photosynthesis_rate", "(", "crop_states", ".", "carbohydrate_amount_Buf", ",", "crop_states", ".", "ca...
[ 6, 0 ]
[ 30, 93 ]
python
en
['en', 'error', 'th']
False
fruit_development_stored_carbohydrates_amount
(jth: int, crop_inputs: CropStates, climate_inputs: ClimateStates)
Equation 9.2 carbohydrate_amount_Fruit_j = carbohydrate_flow_BufFruit_j + carbohydrate_flow_Fruit_jminus_Fruit_j − carbohydrate_flow_Fruit_j_jplus - carbohydrate_flow_FruitAir_j Returns: Carbohydrates are stored in the fruit development stage j [mg m^-2 s^-1]
Equation 9.2 carbohydrate_amount_Fruit_j = carbohydrate_flow_BufFruit_j + carbohydrate_flow_Fruit_jminus_Fruit_j − carbohydrate_flow_Fruit_j_jplus - carbohydrate_flow_FruitAir_j Returns: Carbohydrates are stored in the fruit development stage j [mg m^-2 s^-1]
def fruit_development_stored_carbohydrates_amount(jth: int, crop_inputs: CropStates, climate_inputs: ClimateStates): """ Equation 9.2 carbohydrate_amount_Fruit_j = carbohydrate_flow_BufFruit_j + carbohydrate_flow_Fruit_jminus_Fruit_j − carbohydrate_flow_Fruit_j_jplus - carbohydrate_flow_Fruit...
[ "def", "fruit_development_stored_carbohydrates_amount", "(", "jth", ":", "int", ",", "crop_inputs", ":", "CropStates", ",", "climate_inputs", ":", "ClimateStates", ")", ":", "carbohydrate_flow_BufFruit_j", "=", "carbohydrate_flow_from_buffer_to_fruit_stages", "(", "jth", ",...
[ 33, 0 ]
[ 56, 81 ]
python
en
['en', 'error', 'th']
False
number_of_fruits
(jth: int, crop_states: CropStates)
Equation 9.3 number_Fruit_j = number_flow_Fruit_jminus_Fruit_j - number_flow_Fruit_j_Fruit_jplus Returns: The number of fruits in the fruit development stage j [fruits m^-2 s^-1] Args: crop_states:
Equation 9.3 number_Fruit_j = number_flow_Fruit_jminus_Fruit_j - number_flow_Fruit_j_Fruit_jplus Returns: The number of fruits in the fruit development stage j [fruits m^-2 s^-1]
def number_of_fruits(jth: int, crop_states: CropStates): """ Equation 9.3 number_Fruit_j = number_flow_Fruit_jminus_Fruit_j - number_flow_Fruit_j_Fruit_jplus Returns: The number of fruits in the fruit development stage j [fruits m^-2 s^-1] Args: crop_states: """ number_flow_Fruit_j...
[ "def", "number_of_fruits", "(", "jth", ":", "int", ",", "crop_states", ":", "CropStates", ")", ":", "number_flow_Fruit_jminus_Fruit_j", "=", "fruit_flow_through_fruit_development_stage", "(", "jth", "-", "1", ",", "crop_states", ".", "number_Fruits", ",", "crop_states...
[ 59, 0 ]
[ 74, 77 ]
python
en
['en', 'error', 'th']
False
leaves_stored_carbohydrates_amount
(crop_states: CropStates)
Equation 9.4 carbohydrate_amount_Leaf = carbohydrate_flow_BufLeaf - carbohydrate_flow_LeafAir - carbohydrate_flow_LeafHar Returns: The carbohydrates stored in the leaves [mg m^-2 s^-1]
Equation 9.4 carbohydrate_amount_Leaf = carbohydrate_flow_BufLeaf - carbohydrate_flow_LeafAir - carbohydrate_flow_LeafHar Returns: The carbohydrates stored in the leaves [mg m^-2 s^-1]
def leaves_stored_carbohydrates_amount(crop_states: CropStates): """ Equation 9.4 carbohydrate_amount_Leaf = carbohydrate_flow_BufLeaf - carbohydrate_flow_LeafAir - carbohydrate_flow_LeafHar Returns: The carbohydrates stored in the leaves [mg m^-2 s^-1] """ carbohydrate_flow_BufLeaf = carbohydra...
[ "def", "leaves_stored_carbohydrates_amount", "(", "crop_states", ":", "CropStates", ")", ":", "carbohydrate_flow_BufLeaf", "=", "carbohydrate_flow_from_buffer_to_leaves", "(", "crop_states", ".", "carbohydrate_amount_Buf", ",", "crop_states", ".", "last_24_canopy_t", ")", "ca...
[ 77, 0 ]
[ 88, 92 ]
python
en
['en', 'error', 'th']
False
stem_and_roots_stored_carbohydrates_amount
(crop_states: CropStates)
Equation 9.6 carbohydrate_amount_Stem = carbohydrate_flow_BufStem - carbohydrate_flow_StemAir Returns: The carbohydrates stored in the stem and roots [mg m^-2 s^-1]
Equation 9.6 carbohydrate_amount_Stem = carbohydrate_flow_BufStem - carbohydrate_flow_StemAir Returns: The carbohydrates stored in the stem and roots [mg m^-2 s^-1]
def stem_and_roots_stored_carbohydrates_amount(crop_states: CropStates): """ Equation 9.6 carbohydrate_amount_Stem = carbohydrate_flow_BufStem - carbohydrate_flow_StemAir Returns: The carbohydrates stored in the stem and roots [mg m^-2 s^-1] """ carbohydrate_flow_BufStem = carbohydrate_flow_from...
[ "def", "stem_and_roots_stored_carbohydrates_amount", "(", "crop_states", ":", "CropStates", ")", ":", "carbohydrate_flow_BufStem", "=", "carbohydrate_flow_from_buffer_to_stem", "(", "crop_states", ".", "carbohydrate_amount_Buf", ",", "crop_states", ".", "last_24_canopy_t", ")",...
[ 91, 0 ]
[ 101, 64 ]
python
en
['en', 'error', 'th']
False
accumulated_harvested_tomato_dry_matter
(crop_states: CropStates)
Equation 9.7 dry_matter_Har = CARBOHYDRATE_TO_DRY_MATTER_CONVERSION * carbohydrate_flow_FruitHar Returns: THe accumulated harvested tomato dry matter [mg {DM} m^-2 s^-1]
Equation 9.7 dry_matter_Har = CARBOHYDRATE_TO_DRY_MATTER_CONVERSION * carbohydrate_flow_FruitHar Returns: THe accumulated harvested tomato dry matter [mg {DM} m^-2 s^-1]
def accumulated_harvested_tomato_dry_matter(crop_states: CropStates): """ Equation 9.7 dry_matter_Har = CARBOHYDRATE_TO_DRY_MATTER_CONVERSION * carbohydrate_flow_FruitHar Returns: THe accumulated harvested tomato dry matter [mg {DM} m^-2 s^-1] """ carbohydrate_flow_FruitHar = carbohydrate_flow_t...
[ "def", "accumulated_harvested_tomato_dry_matter", "(", "crop_states", ":", "CropStates", ")", ":", "carbohydrate_flow_FruitHar", "=", "carbohydrate_flow_through_fruit_stages", "(", "FRUIT_DEVELOPMENT_STAGES_NUM", ",", "crop_states", ".", "carbohydrate_amount_Fruits", ",", "crop_s...
[ 104, 0 ]
[ 113, 77 ]
python
en
['en', 'error', 'th']
False
temperature_sum
(climate_states: ClimateStates)
Equation 9.8 sum_canopy_t = t_Canopy/86400 Returns: The temperature sum [°C s^-1]
Equation 9.8 sum_canopy_t = t_Canopy/86400 Returns: The temperature sum [°C s^-1]
def temperature_sum(climate_states: ClimateStates): """ Equation 9.8 sum_canopy_t = t_Canopy/86400 Returns: The temperature sum [°C s^-1] """ return climate_states.t_Canopy / 86400
[ "def", "temperature_sum", "(", "climate_states", ":", "ClimateStates", ")", ":", "return", "climate_states", ".", "t_Canopy", "/", "86400" ]
[ 116, 0 ]
[ 122, 42 ]
python
en
['en', 'error', 'th']
False
_24_mean_temperature
(crop_states: CropStates, climate_states: ClimateStates)
Equation 9.9 last_24_canopy_t = 1/DAY_MEAN_TEMP_TIME_CONSTANT * (PROCESS_GAIN * t_Canopy - last_24_canopy_t) Returns: The 24 hour mean canopy temperature [°C s^-1]
Equation 9.9 last_24_canopy_t = 1/DAY_MEAN_TEMP_TIME_CONSTANT * (PROCESS_GAIN * t_Canopy - last_24_canopy_t) Returns: The 24 hour mean canopy temperature [°C s^-1]
def _24_mean_temperature(crop_states: CropStates, climate_states: ClimateStates): """ Equation 9.9 last_24_canopy_t = 1/DAY_MEAN_TEMP_TIME_CONSTANT * (PROCESS_GAIN * t_Canopy - last_24_canopy_t) Returns: The 24 hour mean canopy temperature [°C s^-1] """ return 1 / DAY_MEAN_TEMP_TIME_CONSTANT * (...
[ "def", "_24_mean_temperature", "(", "crop_states", ":", "CropStates", ",", "climate_states", ":", "ClimateStates", ")", ":", "return", "1", "/", "DAY_MEAN_TEMP_TIME_CONSTANT", "*", "(", "PROCESS_GAIN", "*", "climate_states", ".", "t_Canopy", "-", "crop_states", ".",...
[ 125, 0 ]
[ 131, 116 ]
python
en
['en', 'error', 'th']
False
__init__
( self, *, signature_type: str = None, signature: str = None, sig_data: str = None, signer: str = None, )
Initialize a FieldSignature instance. Args: signature_type: Type of signature signature: The signature sig_data: Signature data signer: The verkey of the signer
Initialize a FieldSignature instance.
def __init__( self, *, signature_type: str = None, signature: str = None, sig_data: str = None, signer: str = None, ): """ Initialize a FieldSignature instance. Args: signature_type: Type of signature signature: The sig...
[ "def", "__init__", "(", "self", ",", "*", ",", "signature_type", ":", "str", "=", "None", ",", "signature", ":", "str", "=", "None", ",", "sig_data", ":", "str", "=", "None", ",", "signer", ":", "str", "=", "None", ",", ")", ":", "self", ".", "si...
[ 28, 4 ]
[ 48, 28 ]
python
en
['en', 'error', 'th']
False
create
( cls, value, signer: str, wallet: BaseWallet, timestamp=None )
Create a Signature. Sign a field value and return a newly constructed `SignatureDecorator` representing the resulting signature. Args: value: Value to sign signer: Verkey of the signing party wallet: The wallet to use for the signature Retu...
Create a Signature.
async def create( cls, value, signer: str, wallet: BaseWallet, timestamp=None ) -> "SignatureDecorator": """ Create a Signature. Sign a field value and return a newly constructed `SignatureDecorator` representing the resulting signature. Args: value: Val...
[ "async", "def", "create", "(", "cls", ",", "value", ",", "signer", ":", "str", ",", "wallet", ":", "BaseWallet", ",", "timestamp", "=", "None", ")", "->", "\"SignatureDecorator\"", ":", "if", "not", "timestamp", ":", "timestamp", "=", "time", ".", "time"...
[ 51, 4 ]
[ 82, 9 ]
python
en
['en', 'error', 'th']
False
decode
(self)
Decode the signature to its timestamp and value. Returns: A tuple of (decoded message, timestamp)
Decode the signature to its timestamp and value.
def decode(self) -> (object, int): """ Decode the signature to its timestamp and value. Returns: A tuple of (decoded message, timestamp) """ msg_bin = b64_to_bytes(self.sig_data, urlsafe=True) timestamp, = struct.unpack_from("!Q", msg_bin, 0) return ...
[ "def", "decode", "(", "self", ")", "->", "(", "object", ",", "int", ")", ":", "msg_bin", "=", "b64_to_bytes", "(", "self", ".", "sig_data", ",", "urlsafe", "=", "True", ")", "timestamp", ",", "=", "struct", ".", "unpack_from", "(", "\"!Q\"", ",", "ms...
[ 84, 4 ]
[ 94, 49 ]
python
en
['en', 'error', 'th']
False
verify
(self, wallet: BaseWallet)
Verify the signature against the signer's public key. Args: wallet: Wallet to use to verify signature Returns: True if verification succeeds else False
Verify the signature against the signer's public key.
async def verify(self, wallet: BaseWallet) -> bool: """ Verify the signature against the signer's public key. Args: wallet: Wallet to use to verify signature Returns: True if verification succeeds else False """ if self.signature_type != self.TY...
[ "async", "def", "verify", "(", "self", ",", "wallet", ":", "BaseWallet", ")", "->", "bool", ":", "if", "self", ".", "signature_type", "!=", "self", ".", "TYPE_ED25519SHA512", ":", "return", "False", "msg_bin", "=", "b64_to_bytes", "(", "self", ".", "sig_da...
[ 96, 4 ]
[ 111, 73 ]
python
en
['en', 'error', 'th']
False
ErrorX.array
(self)
Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data. The 'array' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data. The 'array' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def array(self): """ Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data. The 'array' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- ...
[ "def", "array", "(", "self", ")", ":", "return", "self", "[", "\"array\"", "]" ]
[ 31, 4 ]
[ 43, 28 ]
python
en
['en', 'error', 'th']
False
ErrorX.arrayminus
(self)
Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data. The 'arrayminus' property is an array that may be specified as a tuple, list, numpy array, or pandas Se...
Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data. The 'arrayminus' property is an array that may be specified as a tuple, list, numpy array, or pandas Se...
def arrayminus(self): """ Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data. The 'arrayminus' property is an array that may be specified as a tuple, ...
[ "def", "arrayminus", "(", "self", ")", ":", "return", "self", "[", "\"arrayminus\"", "]" ]
[ 52, 4 ]
[ 65, 33 ]
python
en
['en', 'error', 'th']
False
ErrorX.arrayminussrc
(self)
Sets the source reference on Chart Studio Cloud for arrayminus . The 'arrayminussrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for arrayminus . The 'arrayminussrc' property must be specified as a string or as a plotly.grid_objs.Column object
def arrayminussrc(self): """ Sets the source reference on Chart Studio Cloud for arrayminus . The 'arrayminussrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["arra...
[ "def", "arrayminussrc", "(", "self", ")", ":", "return", "self", "[", "\"arrayminussrc\"", "]" ]
[ 74, 4 ]
[ 86, 36 ]
python
en
['en', 'error', 'th']
False
ErrorX.arraysrc
(self)
Sets the source reference on Chart Studio Cloud for array . The 'arraysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for array . The 'arraysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def arraysrc(self): """ Sets the source reference on Chart Studio Cloud for array . The 'arraysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["arraysrc"]
[ "def", "arraysrc", "(", "self", ")", ":", "return", "self", "[", "\"arraysrc\"", "]" ]
[ 95, 4 ]
[ 106, 31 ]
python
en
['en', 'error', 'th']
False
ErrorX.color
(self)
Sets the stoke color of the error bars. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,1...
Sets the stoke color of the error bars. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,1...
def color(self): """ Sets the stoke color of the error bars. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsv...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 115, 4 ]
[ 165, 28 ]
python
en
['en', 'error', 'th']
False
ErrorX.copy_ystyle
(self)
The 'copy_ystyle' property must be specified as a bool (either True, or False) Returns ------- bool
The 'copy_ystyle' property must be specified as a bool (either True, or False)
def copy_ystyle(self): """ The 'copy_ystyle' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["copy_ystyle"]
[ "def", "copy_ystyle", "(", "self", ")", ":", "return", "self", "[", "\"copy_ystyle\"", "]" ]
[ 174, 4 ]
[ 183, 34 ]
python
en
['en', 'error', 'th']
False
ErrorX.symmetric
(self)
Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False)
def symmetric(self): """ Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False) Returns ...
[ "def", "symmetric", "(", "self", ")", ":", "return", "self", "[", "\"symmetric\"", "]" ]
[ 192, 4 ]
[ 205, 32 ]
python
en
['en', 'error', 'th']
False
ErrorX.thickness
(self)
Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf]
def thickness(self): """ Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["thickness"]
[ "def", "thickness", "(", "self", ")", ":", "return", "self", "[", "\"thickness\"", "]" ]
[ 214, 4 ]
[ 225, 32 ]
python
en
['en', 'error', 'th']
False
ErrorX.traceref
(self)
The 'traceref' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
The 'traceref' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def traceref(self): """ The 'traceref' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["traceref"]
[ "def", "traceref", "(", "self", ")", ":", "return", "self", "[", "\"traceref\"", "]" ]
[ 234, 4 ]
[ 244, 31 ]
python
en
['en', 'error', 'th']
False
ErrorX.tracerefminus
(self)
The 'tracerefminus' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
The 'tracerefminus' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def tracerefminus(self): """ The 'tracerefminus' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["tracerefminus"]
[ "def", "tracerefminus", "(", "self", ")", ":", "return", "self", "[", "\"tracerefminus\"", "]" ]
[ 253, 4 ]
[ 263, 36 ]
python
en
['en', 'error', 'th']
False
ErrorX.type
(self)
Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths corr...
Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths corr...
def type(self): """ Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "...
[ "def", "type", "(", "self", ")", ":", "return", "self", "[", "\"type\"", "]" ]
[ 272, 4 ]
[ 290, 27 ]
python
en
['en', 'error', 'th']
False
ErrorX.value
(self)
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float in the interval [0, inf] ...
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float in the interval [0, inf]
def value(self): """ Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float...
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 299, 4 ]
[ 312, 28 ]
python
en
['en', 'error', 'th']
False
ErrorX.valueminus
(self)
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valueminus' property is a number and ma...
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valueminus' property is a number and ma...
def valueminus(self): """ Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valuem...
[ "def", "valueminus", "(", "self", ")", ":", "return", "self", "[", "\"valueminus\"", "]" ]
[ 321, 4 ]
[ 335, 33 ]
python
en
['en', 'error', 'th']
False
ErrorX.visible
(self)
Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 344, 4 ]
[ 355, 30 ]
python
en
['en', 'error', 'th']
False
ErrorX.width
(self)
Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf]
def width(self): """ Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return s...
[ "def", "width", "(", "self", ")", ":", "return", "self", "[", "\"width\"", "]" ]
[ 364, 4 ]
[ 376, 28 ]
python
en
['en', 'error', 'th']
False
ErrorX.__init__
( self, arg=None, array=None, arrayminus=None, arrayminussrc=None, arraysrc=None, color=None, copy_ystyle=None, symmetric=None, thickness=None, traceref=None, tracerefminus=None, type=None, value=None, ...
Construct a new ErrorX object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.ErrorX` array Sets the data corresponding the length of each e...
Construct a new ErrorX object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.ErrorX` array Sets the data corresponding the length of each e...
def __init__( self, arg=None, array=None, arrayminus=None, arrayminussrc=None, arraysrc=None, color=None, copy_ystyle=None, symmetric=None, thickness=None, traceref=None, tracerefminus=None, type=None, value=...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "array", "=", "None", ",", "arrayminus", "=", "None", ",", "arrayminussrc", "=", "None", ",", "arraysrc", "=", "None", ",", "color", "=", "None", ",", "copy_ystyle", "=", "None", ",", "sym...
[ 444, 4 ]
[ 629, 34 ]
python
en
['en', 'error', 'th']
False
Tickfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Tickfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Tickfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Tickfont.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Tickfont object Sets the tick font. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.ternary .caxis.Tickfont` color fami...
Construct a new Tickfont object Sets the tick font.
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Tickfont object Sets the tick font. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`pl...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Tickfont", ",", "self", ")", ".", "__init__", "(", "\"tick...
[ 143, 4 ]
[ 226, 34 ]
python
en
['en', 'error', 'th']
False
Tickfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Tickfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Tickfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Tickfont.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterpolargl .marker.colorbar.Tickfont` ...
Construct a new Tickfont object Sets the color bar's tick label font
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an insta...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Tickfont", ",", "self", ")", ".", "__init__", "(", "\"tick...
[ 143, 4 ]
[ 226, 34 ]
python
en
['en', 'error', 'th']
False
Tickfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Tickfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Tickfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Tickfont.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.indicator.gaug e.axis.Tickfont` co...
Construct a new Tickfont object Sets the color bar's tick label font
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an insta...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Tickfont", ",", "self", ")", ".", "__init__", "(", "\"tick...
[ 143, 4 ]
[ 226, 34 ]
python
en
['en', 'error', 'th']
False
set_recall_param
(proposal_nums, iou_thrs)
Check proposal_nums and iou_thrs and set correct format.
Check proposal_nums and iou_thrs and set correct format.
def set_recall_param(proposal_nums, iou_thrs): """Check proposal_nums and iou_thrs and set correct format.""" if isinstance(proposal_nums, Sequence): _proposal_nums = np.array(proposal_nums) elif isinstance(proposal_nums, int): _proposal_nums = np.array([proposal_nums]) else: _pr...
[ "def", "set_recall_param", "(", "proposal_nums", ",", "iou_thrs", ")", ":", "if", "isinstance", "(", "proposal_nums", ",", "Sequence", ")", ":", "_proposal_nums", "=", "np", ".", "array", "(", "proposal_nums", ")", "elif", "isinstance", "(", "proposal_nums", "...
[ 42, 0 ]
[ 60, 36 ]
python
en
['en', 'en', 'en']
True
eval_recalls
(gts, proposals, proposal_nums=None, iou_thrs=0.5, logger=None)
Calculate recalls. Args: gts (list[ndarray]): a list of arrays of shape (n, 4) proposals (list[ndarray]): a list of arrays of shape (k, 4) or (k, 5) proposal_nums (int | Sequence[int]): Top N proposals to be evaluated. iou_thrs (float | Sequence[float]): IoU thresholds. Default: 0.5...
Calculate recalls.
def eval_recalls(gts, proposals, proposal_nums=None, iou_thrs=0.5, logger=None): """Calculate recalls. Args: gts (list[ndarray]): a list of arrays of shape (n, 4) proposals (list[ndarray]): a list of arrays of shape (k, 4) or (...
[ "def", "eval_recalls", "(", "gts", ",", "proposals", ",", "proposal_nums", "=", "None", ",", "iou_thrs", "=", "0.5", ",", "logger", "=", "None", ")", ":", "img_num", "=", "len", "(", "gts", ")", "assert", "img_num", "==", "len", "(", "proposals", ")", ...
[ 63, 0 ]
[ 105, 18 ]
python
en
['en', 'co', 'en']
False
print_recall_summary
(recalls, proposal_nums, iou_thrs, row_idxs=None, col_idxs=None, logger=None)
Print recalls in a table. Args: recalls (ndarray): calculated from `bbox_recalls` proposal_nums (ndarray or list): top N proposals iou_thrs (ndarray or list): iou thresholds row_idxs (ndarray): which rows(proposal nums) to print col_idxs (ndarray): which cols(iou thresholds)...
Print recalls in a table.
def print_recall_summary(recalls, proposal_nums, iou_thrs, row_idxs=None, col_idxs=None, logger=None): """Print recalls in a table. Args: recalls (ndarray): calculated from `bbox...
[ "def", "print_recall_summary", "(", "recalls", ",", "proposal_nums", ",", "iou_thrs", ",", "row_idxs", "=", "None", ",", "col_idxs", "=", "None", ",", "logger", "=", "None", ")", ":", "proposal_nums", "=", "np", ".", "array", "(", "proposal_nums", ",", "dt...
[ 108, 0 ]
[ 138, 48 ]
python
en
['en', 'en', 'en']
True
plot_num_recall
(recalls, proposal_nums)
Plot Proposal_num-Recalls curve. Args: recalls(ndarray or list): shape (k,) proposal_nums(ndarray or list): same shape as `recalls`
Plot Proposal_num-Recalls curve.
def plot_num_recall(recalls, proposal_nums): """Plot Proposal_num-Recalls curve. Args: recalls(ndarray or list): shape (k,) proposal_nums(ndarray or list): same shape as `recalls` """ if isinstance(proposal_nums, np.ndarray): _proposal_nums = proposal_nums.tolist() else: ...
[ "def", "plot_num_recall", "(", "recalls", ",", "proposal_nums", ")", ":", "if", "isinstance", "(", "proposal_nums", ",", "np", ".", "ndarray", ")", ":", "_proposal_nums", "=", "proposal_nums", ".", "tolist", "(", ")", "else", ":", "_proposal_nums", "=", "pro...
[ 141, 0 ]
[ 163, 12 ]
python
ca
['mt', 'ca', 'en']
False
plot_iou_recall
(recalls, iou_thrs)
Plot IoU-Recalls curve. Args: recalls(ndarray or list): shape (k,) iou_thrs(ndarray or list): same shape as `recalls`
Plot IoU-Recalls curve.
def plot_iou_recall(recalls, iou_thrs): """Plot IoU-Recalls curve. Args: recalls(ndarray or list): shape (k,) iou_thrs(ndarray or list): same shape as `recalls` """ if isinstance(iou_thrs, np.ndarray): _iou_thrs = iou_thrs.tolist() else: _iou_thrs = iou_thrs if i...
[ "def", "plot_iou_recall", "(", "recalls", ",", "iou_thrs", ")", ":", "if", "isinstance", "(", "iou_thrs", ",", "np", ".", "ndarray", ")", ":", "_iou_thrs", "=", "iou_thrs", ".", "tolist", "(", ")", "else", ":", "_iou_thrs", "=", "iou_thrs", "if", "isinst...
[ 166, 0 ]
[ 188, 12 ]
python
en
['mt', 'la', 'en']
False
TagHandler.__init__
(self, obj)
Tags are stored internally in the TypedObject.db_tags m2m field with an tag.db_model based on the obj the taghandler is stored on and with a tagtype given by self.handlertype Args: obj (object): The object on which the handler is set.
Tags are stored internally in the TypedObject.db_tags m2m field with an tag.db_model based on the obj the taghandler is stored on and with a tagtype given by self.handlertype
def __init__(self, obj): """ Tags are stored internally in the TypedObject.db_tags m2m field with an tag.db_model based on the obj the taghandler is stored on and with a tagtype given by self.handlertype Args: obj (object): The object on which the handler is set. ...
[ "def", "__init__", "(", "self", ",", "obj", ")", ":", "self", ".", "obj", "=", "obj", "self", ".", "_objid", "=", "obj", ".", "id", "self", ".", "_model", "=", "obj", ".", "__dbclass__", ".", "__name__", ".", "lower", "(", ")", "self", ".", "_cac...
[ 87, 4 ]
[ 104, 36 ]
python
en
['en', 'error', 'th']
False
TagHandler._fullcache
(self)
Cache all tags of this object
Cache all tags of this object
def _fullcache(self): "Cache all tags of this object" query = {"%s__id" % self._model: self._objid, "tag__db_model": self._model, "tag__db_tagtype": self._tagtype} tags = [conn.tag for conn in getattr(self.obj, self._m2m_fieldname).through.objects.filter(**query...
[ "def", "_fullcache", "(", "self", ")", ":", "query", "=", "{", "\"%s__id\"", "%", "self", ".", "_model", ":", "self", ".", "_objid", ",", "\"tag__db_model\"", ":", "self", ".", "_model", ",", "\"tag__db_tagtype\"", ":", "self", ".", "_tagtype", "}", "tag...
[ 106, 4 ]
[ 115, 35 ]
python
en
['en', 'en', 'en']
True
TagHandler._getcache
(self, key=None, category=None)
Retrieve from cache or database (always caches) Args: key (str, optional): Tag key to query for category (str, optional): Tag category Returns: args (list): Returns a list of zero or more matches found from cache or database. Notes: ...
Retrieve from cache or database (always caches)
def _getcache(self, key=None, category=None): """ Retrieve from cache or database (always caches) Args: key (str, optional): Tag key to query for category (str, optional): Tag category Returns: args (list): Returns a list of zero or more matches ...
[ "def", "_getcache", "(", "self", ",", "key", "=", "None", ",", "category", "=", "None", ")", ":", "key", "=", "key", ".", "strip", "(", ")", ".", "lower", "(", ")", "if", "key", "else", "None", "category", "=", "category", ".", "strip", "(", ")",...
[ 117, 4 ]
[ 183, 17 ]
python
en
['en', 'error', 'th']
False
TagHandler._setcache
(self, key, category, tag_obj)
Update cache. Args: key (str): A cleaned key string category (str or None): A cleaned category name tag_obj (tag): The newly saved tag
Update cache.
def _setcache(self, key, category, tag_obj): """ Update cache. Args: key (str): A cleaned key string category (str or None): A cleaned category name tag_obj (tag): The newly saved tag """ if not key: # don't allow an empty key in cache ...
[ "def", "_setcache", "(", "self", ",", "key", ",", "category", ",", "tag_obj", ")", ":", "if", "not", "key", ":", "# don't allow an empty key in cache", "return", "key", ",", "category", "=", "key", ".", "strip", "(", ")", ".", "lower", "(", ")", ",", "...
[ 185, 4 ]
[ 203, 36 ]
python
en
['en', 'error', 'th']
False
TagHandler._delcache
(self, key, category)
Remove tag from cache Args: key (str): A cleaned key string category (str or None): A cleaned category name
Remove tag from cache
def _delcache(self, key, category): """ Remove tag from cache Args: key (str): A cleaned key string category (str or None): A cleaned category name """ key, category = key.strip().lower(), category.strip().lower() if category else category catkey...
[ "def", "_delcache", "(", "self", ",", "key", ",", "category", ")", ":", "key", ",", "category", "=", "key", ".", "strip", "(", ")", ".", "lower", "(", ")", ",", "category", ".", "strip", "(", ")", ".", "lower", "(", ")", "if", "category", "else",...
[ 205, 4 ]
[ 223, 36 ]
python
en
['en', 'error', 'th']
False
TagHandler.reset_cache
(self)
Reset the cache from the outside.
Reset the cache from the outside.
def reset_cache(self): """ Reset the cache from the outside. """ self._cache_complete = False self._cache = {} self._catcache = {}
[ "def", "reset_cache", "(", "self", ")", ":", "self", ".", "_cache_complete", "=", "False", "self", ".", "_cache", "=", "{", "}", "self", ".", "_catcache", "=", "{", "}" ]
[ 225, 4 ]
[ 231, 27 ]
python
en
['en', 'error', 'th']
False
TagHandler.add
(self, tag=None, category=None, data=None)
Add a new tag to the handler. Args: tag (str or list): The name of the tag to add. If a list, add several Tags. category (str, optional): Category of Tag. `None` is the default category. data (str, optional): Info text about the tag(s) added. ...
Add a new tag to the handler.
def add(self, tag=None, category=None, data=None): """ Add a new tag to the handler. Args: tag (str or list): The name of the tag to add. If a list, add several Tags. category (str, optional): Category of Tag. `None` is the default category. d...
[ "def", "add", "(", "self", ",", "tag", "=", "None", ",", "category", "=", "None", ",", "data", "=", "None", ")", ":", "if", "not", "tag", ":", "return", "if", "not", "self", ".", "_cache_complete", ":", "self", ".", "_fullcache", "(", ")", "for", ...
[ 233, 4 ]
[ 267, 52 ]
python
en
['en', 'error', 'th']
False
TagHandler.get
(self, key=None, default=None, category=None, return_tagobj=False, return_list=False)
Get the tag for the given key, category or combination of the two. Args: key (str or list, optional): The tag or tags to retrieve. default (any, optional): The value to return in case of no match. category (str, optional): The Tag category to limit the ...
Get the tag for the given key, category or combination of the two.
def get(self, key=None, default=None, category=None, return_tagobj=False, return_list=False): """ Get the tag for the given key, category or combination of the two. Args: key (str or list, optional): The tag or tags to retrieve. default (any, optional): The value to retu...
[ "def", "get", "(", "self", ",", "key", "=", "None", ",", "default", "=", "None", ",", "category", "=", "None", ",", "return_tagobj", "=", "False", ",", "return_list", "=", "False", ")", ":", "ret", "=", "[", "]", "for", "keystr", "in", "make_iter", ...
[ 269, 4 ]
[ 299, 69 ]
python
en
['en', 'error', 'th']
False
TagHandler.remove
(self, key, category=None)
Remove a tag from the handler based ond key and category. Args: key (str or list): The tag or tags to retrieve. category (str, optional): The Tag category to limit the request to. Note that `None` is the valid, default category.
Remove a tag from the handler based ond key and category.
def remove(self, key, category=None): """ Remove a tag from the handler based ond key and category. Args: key (str or list): The tag or tags to retrieve. category (str, optional): The Tag category to limit the request to. Note that `None` is the valid, de...
[ "def", "remove", "(", "self", ",", "key", ",", "category", "=", "None", ")", ":", "for", "key", "in", "make_iter", "(", "key", ")", ":", "if", "not", "(", "key", "or", "key", ".", "strip", "(", ")", ")", ":", "# we don't allow empty tags", "continue"...
[ 301, 4 ]
[ 325, 41 ]
python
en
['en', 'error', 'th']
False
TagHandler.clear
(self, category=None)
Remove all tags from the handler. Args: category (str, optional): The Tag category to limit the request to. Note that `None` is the valid, default category.
Remove all tags from the handler.
def clear(self, category=None): """ Remove all tags from the handler. Args: category (str, optional): The Tag category to limit the request to. Note that `None` is the valid, default category. """ if not self._cache_complete: ...
[ "def", "clear", "(", "self", ",", "category", "=", "None", ")", ":", "if", "not", "self", ".", "_cache_complete", ":", "self", ".", "_fullcache", "(", ")", "query", "=", "{", "\"%s__id\"", "%", "self", ".", "_model", ":", "self", ".", "_objid", ",", ...
[ 327, 4 ]
[ 345, 36 ]
python
en
['en', 'error', 'th']
False
TagHandler.all
(self, return_key_and_category=False, return_objs=False)
Get all tags in this handler, regardless of category. Args: return_key_and_category (bool, optional): Return a list of tuples `[(key, category), ...]`. return_objs (bool, optional): Return tag objects. Returns: tags (list): A list of tag key...
Get all tags in this handler, regardless of category.
def all(self, return_key_and_category=False, return_objs=False): """ Get all tags in this handler, regardless of category. Args: return_key_and_category (bool, optional): Return a list of tuples `[(key, category), ...]`. return_objs (bool, optional): Retu...
[ "def", "all", "(", "self", ",", "return_key_and_category", "=", "False", ",", "return_objs", "=", "False", ")", ":", "if", "not", "self", ".", "_cache_complete", ":", "self", ".", "_fullcache", "(", ")", "tags", "=", "sorted", "(", "self", ".", "_cache",...
[ 347, 4 ]
[ 371, 55 ]
python
en
['en', 'error', 'th']
False
TagHandler.batch_add
(self, *args)
Batch-add tags from a list of tuples. Args: tuples (tuple or str): Any number of `tagstr` keys, `(keystr, category)` or `(keystr, category, data)` tuples. Notes: This will generate a mimimal number of self.add calls, based on the number of c...
Batch-add tags from a list of tuples.
def batch_add(self, *args): """ Batch-add tags from a list of tuples. Args: tuples (tuple or str): Any number of `tagstr` keys, `(keystr, category)` or `(keystr, category, data)` tuples. Notes: This will generate a mimimal number of self.add call...
[ "def", "batch_add", "(", "self", ",", "*", "args", ")", ":", "keys", "=", "defaultdict", "(", "list", ")", "data", "=", "{", "}", "for", "tup", "in", "args", ":", "tup", "=", "make_iter", "(", "tup", ")", "nlen", "=", "len", "(", "tup", ")", "i...
[ 373, 4 ]
[ 401, 79 ]
python
en
['en', 'error', 'th']
False
_migrate_ledger
(data_directory, old_ledger_file, new_ledger_file, serializer: MappingSerializer = None)
Test for the directory, open old and new ledger, migrate data, rename directories
Test for the directory, open old and new ledger, migrate data, rename directories
def _migrate_ledger(data_directory, old_ledger_file, new_ledger_file, serializer: MappingSerializer = None): """ Test for the directory, open old and new ledger, migrate data, rename directories """ # we should have ChunkedFileStorage implementation of the Ledger...
[ "def", "_migrate_ledger", "(", "data_directory", ",", "old_ledger_file", ",", "new_ledger_file", ",", "serializer", ":", "MappingSerializer", "=", "None", ")", ":", "# we should have ChunkedFileStorage implementation of the Ledger", "if", "not", "os", ".", "path", ".", ...
[ 22, 0 ]
[ 71, 54 ]
python
en
['en', 'error', 'th']
False
Solution.rotate
(self, nums: List[int], k: int)
Do not return anything, modify nums in-place instead.
Do not return anything, modify nums in-place instead.
def rotate(self, nums: List[int], k: int) -> None: """ Do not return anything, modify nums in-place instead. """ nums.reverse() nums[:k] = reversed(nums[:k]) nums[k:] = reversed(nums[k:]) return nums
[ "def", "rotate", "(", "self", ",", "nums", ":", "List", "[", "int", "]", ",", "k", ":", "int", ")", "->", "None", ":", "nums", ".", "reverse", "(", ")", "nums", "[", ":", "k", "]", "=", "reversed", "(", "nums", "[", ":", "k", "]", ")", "num...
[ 1, 4 ]
[ 8, 19 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.align
(self)
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
def align(self): """ Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeratio...
[ "def", "align", "(", "self", ")", ":", "return", "self", "[", "\"align\"", "]" ]
[ 25, 4 ]
[ 40, 28 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.alignsrc
(self)
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def alignsrc(self): """ Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["alignsrc"]
[ "def", "alignsrc", "(", "self", ")", ":", "return", "self", "[", "\"alignsrc\"", "]" ]
[ 49, 4 ]
[ 60, 31 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
def bgcolor(self): """ Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)...
[ "def", "bgcolor", "(", "self", ")", ":", "return", "self", "[", "\"bgcolor\"", "]" ]
[ 69, 4 ]
[ 120, 30 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolorsrc
(self)
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def bgcolorsrc(self): """ Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bgcolorsrc"]
[ "def", "bgcolorsrc", "(", "self", ")", ":", "return", "self", "[", "\"bgcolorsrc\"", "]" ]
[ 129, 4 ]
[ 140, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolor
(self)
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
def bordercolor(self): """ Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%...
[ "def", "bordercolor", "(", "self", ")", ":", "return", "self", "[", "\"bordercolor\"", "]" ]
[ 149, 4 ]
[ 200, 34 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolorsrc
(self)
Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def bordercolorsrc(self): """ Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bo...
[ "def", "bordercolorsrc", "(", "self", ")", ":", "return", "self", "[", "\"bordercolorsrc\"", "]" ]
[ 209, 4 ]
[ 221, 37 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.font
(self)
Sets the font used in hover labels. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` - A dict of string/value properties that will be passed to the Font constructor...
Sets the font used in hover labels. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` - A dict of string/value properties that will be passed to the Font constructor...
def font(self): """ Sets the font used in hover labels. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` - A dict of string/value properties that will be passed ...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 230, 4 ]
[ 277, 27 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelength
(self)
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
def namelength(self): """ Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than ...
[ "def", "namelength", "(", "self", ")", ":", "return", "self", "[", "\"namelength\"", "]" ]
[ 286, 4 ]
[ 304, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelengthsrc
(self)
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def namelengthsrc(self): """ Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["name...
[ "def", "namelengthsrc", "(", "self", ")", ":", "return", "self", "[", "\"namelengthsrc\"", "]" ]
[ 313, 4 ]
[ 325, 36 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.__init__
( self, arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs )
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel` align Sets the horizontal alignment of t...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel` align Sets the horizontal alignment of t...
def __init__( self, arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs ): """ Construct a n...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "align", "=", "None", ",", "alignsrc", "=", "None", ",", "bgcolor", "=", "None", ",", "bgcolorsrc", "=", "None", ",", "bordercolor", "=", "None", ",", "bordercolorsrc", "=", "None", ",", "...
[ 370, 4 ]
[ 502, 34 ]
python
en
['en', 'error', 'th']
False
ReadFile
(filename, print_error=True)
Returns the contents of a file.
Returns the contents of a file.
def ReadFile(filename, print_error=True): """Returns the contents of a file.""" try: fp = open(filename) try: return fp.read() finally: fp.close() except IOError: if print_error: print('Error reading %s: %s' % (filename, sys.exc_info()[1]))...
[ "def", "ReadFile", "(", "filename", ",", "print_error", "=", "True", ")", ":", "try", ":", "fp", "=", "open", "(", "filename", ")", "try", ":", "return", "fp", ".", "read", "(", ")", "finally", ":", "fp", ".", "close", "(", ")", "except", "IOError"...
[ 29, 0 ]
[ 40, 19 ]
python
en
['en', 'en', 'en']
True
Hoverlabel.align
(self)
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
def align(self): """ Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeratio...
[ "def", "align", "(", "self", ")", ":", "return", "self", "[", "\"align\"", "]" ]
[ 25, 4 ]
[ 40, 28 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.alignsrc
(self)
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def alignsrc(self): """ Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["alignsrc"]
[ "def", "alignsrc", "(", "self", ")", ":", "return", "self", "[", "\"alignsrc\"", "]" ]
[ 49, 4 ]
[ 60, 31 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
def bgcolor(self): """ Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)...
[ "def", "bgcolor", "(", "self", ")", ":", "return", "self", "[", "\"bgcolor\"", "]" ]
[ 69, 4 ]
[ 120, 30 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolorsrc
(self)
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def bgcolorsrc(self): """ Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bgcolorsrc"]
[ "def", "bgcolorsrc", "(", "self", ")", ":", "return", "self", "[", "\"bgcolorsrc\"", "]" ]
[ 129, 4 ]
[ 140, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolor
(self)
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
def bordercolor(self): """ Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%...
[ "def", "bordercolor", "(", "self", ")", ":", "return", "self", "[", "\"bordercolor\"", "]" ]
[ 149, 4 ]
[ 200, 34 ]
python
en
['en', 'error', 'th']
False