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
AcuteEvalRunner.check_and_update_worker_approval
(self, agent: "Agent")
Soft block workers who fail onboarding tasks, keep track of their status. :param agent: Agent that the worker completed the task with.
Soft block workers who fail onboarding tasks, keep track of their status.
def check_and_update_worker_approval(self, agent: "Agent"): """ Soft block workers who fail onboarding tasks, keep track of their status. :param agent: Agent that the worker completed the task with. """ worker = agent.get_worker() worker_id = worker.db_id ...
[ "def", "check_and_update_worker_approval", "(", "self", ",", "agent", ":", "\"Agent\"", ")", ":", "worker", "=", "agent", ".", "get_worker", "(", ")", "worker_id", "=", "worker", ".", "db_id", "save_data", "=", "agent", ".", "state", ".", "get_data", "(", ...
[ 370, 4 ]
[ 412, 42 ]
python
en
['en', 'error', 'th']
False
AcuteEvalRunner.get_init_data_for_agent
(self, agent: "Agent")
Return the data for an agent already assigned to a particular unit.
Return the data for an agent already assigned to a particular unit.
def get_init_data_for_agent(self, agent: "Agent") -> List[PairingsDict]: """ Return the data for an agent already assigned to a particular unit. """ init_state = agent.state.get_init_state() if init_state is not None: # reconnecting agent, give what we've got ...
[ "def", "get_init_data_for_agent", "(", "self", ",", "agent", ":", "\"Agent\"", ")", "->", "List", "[", "PairingsDict", "]", ":", "init_state", "=", "agent", ".", "state", ".", "get_init_state", "(", ")", "if", "init_state", "is", "not", "None", ":", "# rec...
[ 414, 4 ]
[ 427, 28 ]
python
en
['en', 'error', 'th']
False
AcuteEvalRunner.run_unit
(self, unit: "Unit", agent: "Agent")
Static runners will get the task data, send it to the user, then wait for the agent to act (the data to be completed)
Static runners will get the task data, send it to the user, then wait for the agent to act (the data to be completed)
def run_unit(self, unit: "Unit", agent: "Agent") -> None: """ Static runners will get the task data, send it to the user, then wait for the agent to act (the data to be completed) """ # Frontend implicitly asks for the initialization data, so we just need # to wait for a ...
[ "def", "run_unit", "(", "self", ",", "unit", ":", "\"Unit\"", ",", "agent", ":", "\"Agent\"", ")", "->", "None", ":", "# Frontend implicitly asks for the initialization data, so we just need", "# to wait for a response", "_", "=", "agent", ".", "act", "(", "timeout", ...
[ 429, 4 ]
[ 440, 51 ]
python
en
['en', 'error', 'th']
False
AcuteEvalRunner.cleanup_unit
(self, unit: "Unit")
An incomplete task needs to have the contents of that task requeued into the overall task queue.
An incomplete task needs to have the contents of that task requeued into the overall task queue.
def cleanup_unit(self, unit: "Unit") -> None: """ An incomplete task needs to have the contents of that task requeued into the overall task queue. """ logger.info(f"Cleaning up unit {unit.db_id}") if unit.db_id not in self.unit_agent_map: return logger.warning...
[ "def", "cleanup_unit", "(", "self", ",", "unit", ":", "\"Unit\"", ")", "->", "None", ":", "logger", ".", "info", "(", "f\"Cleaning up unit {unit.db_id}\"", ")", "if", "unit", ".", "db_id", "not", "in", "self", ".", "unit_agent_map", ":", "return", "logger", ...
[ 442, 4 ]
[ 454, 52 ]
python
en
['en', 'error', 'th']
False
Title.font
(self)
Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` ...
Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` ...
def font(self): """ Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scen...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 15, 4 ]
[ 53, 27 ]
python
en
['en', 'error', 'th']
False
Title.text
(self)
Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A numb...
Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A numb...
def text(self): """ Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - ...
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 62, 4 ]
[ 76, 27 ]
python
en
['en', 'error', 'th']
False
Title.__init__
(self, arg=None, font=None, text=None, **kwargs)
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title` font Sets this axis' title font. Note that th...
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title` font Sets this axis' title font. Note that th...
def __init__(self, arg=None, font=None, text=None, **kwargs): """ Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.scene.zaxis...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "font", "=", "None", ",", "text", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Title", ",", "self", ")", ".", "__init__", "(", "\"title\"", ")", "if", "\"_parent\"", ...
[ 98, 4 ]
[ 166, 34 ]
python
en
['en', 'error', 'th']
False
Rangeselector.activecolor
(self)
Sets the background color of the active range selector button. The 'activecolor' 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/hs...
Sets the background color of the active range selector button. The 'activecolor' 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/hs...
def activecolor(self): """ Sets the background color of the active range selector button. The 'activecolor' 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...
[ "def", "activecolor", "(", "self", ")", ":", "return", "self", "[", "\"activecolor\"", "]" ]
[ 28, 4 ]
[ 78, 34 ]
python
en
['en', 'error', 'th']
False
Rangeselector.bgcolor
(self)
Sets the background color of the range selector buttons. 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 string ...
Sets the background color of the range selector buttons. 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 string ...
def bgcolor(self): """ Sets the background color of the range selector buttons. 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\"", "]" ]
[ 87, 4 ]
[ 137, 30 ]
python
en
['en', 'error', 'th']
False
Rangeselector.bordercolor
(self)
Sets the color of the border enclosing the range selector. 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 s...
Sets the color of the border enclosing the range selector. 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 s...
def bordercolor(self): """ Sets the color of the border enclosing the range selector. 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\"", "]" ]
[ 146, 4 ]
[ 196, 34 ]
python
en
['en', 'error', 'th']
False
Rangeselector.borderwidth
(self)
Sets the width (in px) of the border enclosing the range selector. The 'borderwidth' 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 border enclosing the range selector. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf]
def borderwidth(self): """ Sets the width (in px) of the border enclosing the range selector. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ r...
[ "def", "borderwidth", "(", "self", ")", ":", "return", "self", "[", "\"borderwidth\"", "]" ]
[ 205, 4 ]
[ 217, 34 ]
python
en
['en', 'error', 'th']
False
Rangeselector.buttons
(self)
Sets the specifications for each buttons. By default, a range selector comes with no buttons. The 'buttons' property is a tuple of instances of Button that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.xaxis.rangeselector.Button ...
Sets the specifications for each buttons. By default, a range selector comes with no buttons. The 'buttons' property is a tuple of instances of Button that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.xaxis.rangeselector.Button ...
def buttons(self): """ Sets the specifications for each buttons. By default, a range selector comes with no buttons. The 'buttons' property is a tuple of instances of Button that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.xaxis....
[ "def", "buttons", "(", "self", ")", ":", "return", "self", "[", "\"buttons\"", "]" ]
[ 226, 4 ]
[ 289, 30 ]
python
en
['en', 'error', 'th']
False
Rangeselector.buttondefaults
(self)
When used in a template (as layout.template.layout.xaxis.rangeselector.buttondefaults), sets the default property values to use for elements of layout.xaxis.rangeselector.buttons The 'buttondefaults' property is an instance of Button that may be specified as: ...
When used in a template (as layout.template.layout.xaxis.rangeselector.buttondefaults), sets the default property values to use for elements of layout.xaxis.rangeselector.buttons The 'buttondefaults' property is an instance of Button that may be specified as: ...
def buttondefaults(self): """ When used in a template (as layout.template.layout.xaxis.rangeselector.buttondefaults), sets the default property values to use for elements of layout.xaxis.rangeselector.buttons The 'buttondefaults' property is an instance of Button ...
[ "def", "buttondefaults", "(", "self", ")", ":", "return", "self", "[", "\"buttondefaults\"", "]" ]
[ 298, 4 ]
[ 317, 37 ]
python
en
['en', 'error', 'th']
False
Rangeselector.font
(self)
Sets the font of the range selector button text. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font` - A dict of string/value properties that will be passed to the F...
Sets the font of the range selector button text. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font` - A dict of string/value properties that will be passed to the F...
def font(self): """ Sets the font of the range selector button text. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font` - A dict of string/value properties that will be ...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 326, 4 ]
[ 363, 27 ]
python
en
['en', 'error', 'th']
False
Rangeselector.visible
(self)
Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to "date". The 'visible' property must be specified as a bool (either True, or False) Returns ------- bo...
Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to "date". The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to "date". The 'visible' property must be specified as a bool (either True, or False) Retu...
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 372, 4 ]
[ 385, 30 ]
python
en
['en', 'error', 'th']
False
Rangeselector.x
(self)
Sets the x position (in normalized coordinates) of the range selector. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
Sets the x position (in normalized coordinates) of the range selector. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3]
def x(self): """ Sets the x position (in normalized coordinates) of the range selector. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 394, 4 ]
[ 406, 24 ]
python
en
['en', 'error', 'th']
False
Rangeselector.xanchor
(self)
Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ...
Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ...
def xanchor(self): """ Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. The 'xanchor' property is an enumeration that may be specified as: - One of the following enume...
[ "def", "xanchor", "(", "self", ")", ":", "return", "self", "[", "\"xanchor\"", "]" ]
[ 415, 4 ]
[ 429, 30 ]
python
en
['en', 'error', 'th']
False
Rangeselector.y
(self)
Sets the y position (in normalized coordinates) of the range selector. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
Sets the y position (in normalized coordinates) of the range selector. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3]
def y(self): """ Sets the y position (in normalized coordinates) of the range selector. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 438, 4 ]
[ 450, 24 ]
python
en
['en', 'error', 'th']
False
Rangeselector.yanchor
(self)
Sets the range selector's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
Sets the range selector's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
def yanchor(self): """ Sets the range selector's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumerat...
[ "def", "yanchor", "(", "self", ")", ":", "return", "self", "[", "\"yanchor\"", "]" ]
[ 459, 4 ]
[ 473, 30 ]
python
en
['en', 'error', 'th']
False
Rangeselector.__init__
( self, arg=None, activecolor=None, bgcolor=None, bordercolor=None, borderwidth=None, buttons=None, buttondefaults=None, font=None, visible=None, x=None, xanchor=None, y=None, yanchor=None, **kwargs ...
Construct a new Rangeselector object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector` activecolor Sets the background col...
Construct a new Rangeselector object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector` activecolor Sets the background col...
def __init__( self, arg=None, activecolor=None, bgcolor=None, bordercolor=None, borderwidth=None, buttons=None, buttondefaults=None, font=None, visible=None, x=None, xanchor=None, y=None, yanchor=None, ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "activecolor", "=", "None", ",", "bgcolor", "=", "None", ",", "bordercolor", "=", "None", ",", "borderwidth", "=", "None", ",", "buttons", "=", "None", ",", "buttondefaults", "=", "None", ",...
[ 526, 4 ]
[ 681, 34 ]
python
en
['en', 'error', 'th']
False
Title.font
(self)
Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` ...
Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` ...
def font(self): """ Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.pola...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 15, 4 ]
[ 53, 27 ]
python
en
['en', 'error', 'th']
False
Title.text
(self)
Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A numb...
Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A numb...
def text(self): """ Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - ...
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 62, 4 ]
[ 76, 27 ]
python
en
['en', 'error', 'th']
False
Title.__init__
(self, arg=None, font=None, text=None, **kwargs)
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.polar.r adialaxis.Title` font Sets this axis' title font. Note t...
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.polar.r adialaxis.Title` font Sets this axis' title font. Note t...
def __init__(self, arg=None, font=None, text=None, **kwargs): """ Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.polar.r adi...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "font", "=", "None", ",", "text", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Title", ",", "self", ")", ".", "__init__", "(", "\"title\"", ")", "if", "\"_parent\"", ...
[ 98, 4 ]
[ 166, 34 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.add_cmdline_args
( cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None )
Add command-line arguments specifically for this agent.
Add command-line arguments specifically for this agent.
def add_cmdline_args( cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None ) -> ParlaiParser: """ Add command-line arguments specifically for this agent. """ agent = parser.add_argument_group('StarSpace Arguments') agent.add_argument( '-emb', ...
[ "def", "add_cmdline_args", "(", "cls", ",", "parser", ":", "ParlaiParser", ",", "partial_opt", ":", "Optional", "[", "Opt", "]", "=", "None", ")", "->", "ParlaiParser", ":", "agent", "=", "parser", ".", "add_argument_group", "(", "'StarSpace Arguments'", ")", ...
[ 54, 4 ]
[ 183, 21 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.__init__
(self, opt, shared=None)
Set up model if shared params not set, otherwise no work to do.
Set up model if shared params not set, otherwise no work to do.
def __init__(self, opt, shared=None): """ Set up model if shared params not set, otherwise no work to do. """ super().__init__(opt, shared) opt = self.opt self.reset_metrics() self.id = 'Starspace' self.NULL_IDX = 0 self.cands = torch.LongTensor(1,...
[ "def", "__init__", "(", "self", ",", "opt", ",", "shared", "=", "None", ")", ":", "super", "(", ")", ".", "__init__", "(", "opt", ",", "shared", ")", "opt", "=", "self", ".", "opt", "self", ".", "reset_metrics", "(", ")", "self", ".", "id", "=", ...
[ 185, 4 ]
[ 235, 45 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent._init_embeddings
(self)
Copy embeddings from the pretrained embeddings to the lookuptable. :param weight: weights of lookup table (nn.Embedding/nn.EmbeddingBag) :param emb_type: pretrained embedding type
Copy embeddings from the pretrained embeddings to the lookuptable.
def _init_embeddings(self): """ Copy embeddings from the pretrained embeddings to the lookuptable. :param weight: weights of lookup table (nn.Embedding/nn.EmbeddingBag) :param emb_type: pretrained embedding type """ weight = self.model.lt.weight emb_type = self...
[ "def", "_init_embeddings", "(", "self", ")", ":", "weight", "=", "self", ".", "model", ".", "lt", ".", "weight", "emb_type", "=", "self", ".", "opt", ".", "get", "(", "'embedding_type'", ",", "'random'", ")", "if", "emb_type", "==", "'random'", ":", "r...
[ 237, 4 ]
[ 260, 9 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.reset
(self)
Reset observation and episode_done.
Reset observation and episode_done.
def reset(self): """ Reset observation and episode_done. """ self.observation = None self.episode_done = True # set up optimizer lr = self.opt['learningrate'] optim_class = StarspaceAgent.OPTIM_OPTS[self.opt['optimizer']] kwargs = {'lr': lr} ...
[ "def", "reset", "(", "self", ")", ":", "self", ".", "observation", "=", "None", "self", ".", "episode_done", "=", "True", "# set up optimizer", "lr", "=", "self", ".", "opt", "[", "'learningrate'", "]", "optim_class", "=", "StarspaceAgent", ".", "OPTIM_OPTS"...
[ 262, 4 ]
[ 272, 71 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.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['dict'] = self.dict shared['model'] = self.model return shared
[ "def", "share", "(", "self", ")", ":", "shared", "=", "super", "(", ")", ".", "share", "(", ")", "shared", "[", "'dict'", "]", "=", "self", ".", "dict", "shared", "[", "'model'", "]", "=", "self", ".", "model", "return", "shared" ]
[ 274, 4 ]
[ 281, 21 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.override_opt
(self, new_opt)
Set overridable opts from loaded opt file. Print out each added key and each overriden key. Only override args specific to the model.
Set overridable opts from loaded opt file.
def override_opt(self, new_opt): """ Set overridable opts from loaded opt file. Print out each added key and each overriden key. Only override args specific to the model. """ model_args = {'embeddingsize', 'optimizer'} for k, v in new_opt.items(): if ...
[ "def", "override_opt", "(", "self", ",", "new_opt", ")", ":", "model_args", "=", "{", "'embeddingsize'", ",", "'optimizer'", "}", "for", "k", ",", "v", "in", "new_opt", ".", "items", "(", ")", ":", "if", "k", "not", "in", "model_args", ":", "# skip non...
[ 283, 4 ]
[ 304, 23 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.parse
(self, text)
Convert string to token indices.
Convert string to token indices.
def parse(self, text): """ Convert string to token indices. """ vec = self.dict.txt2vec(text) if vec == []: vec = [self.dict[self.dict.null_token]] return vec
[ "def", "parse", "(", "self", ",", "text", ")", ":", "vec", "=", "self", ".", "dict", ".", "txt2vec", "(", "text", ")", "if", "vec", "==", "[", "]", ":", "vec", "=", "[", "self", ".", "dict", "[", "self", ".", "dict", ".", "null_token", "]", "...
[ 306, 4 ]
[ 313, 18 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.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 = [] for i in vec: new_vec.append(i) return self.dict.vec2txt(new_vec)
[ "def", "v2t", "(", "self", ",", "vec", ")", ":", "new_vec", "=", "[", "]", "for", "i", "in", "vec", ":", "new_vec", ".", "append", "(", "i", ")", "return", "self", ".", "dict", ".", "vec2txt", "(", "new_vec", ")" ]
[ 315, 4 ]
[ 322, 41 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.predict
(self, xs, ys=None, cands=None, cands_txt=None, obs=None)
Produce a prediction from our model. Update the model using the targets if available, otherwise rank candidates as well if they are available and param is set.
Produce a prediction from our model.
def predict(self, xs, ys=None, cands=None, cands_txt=None, obs=None): """ Produce a prediction from our model. Update the model using the targets if available, otherwise rank candidates as well if they are available and param is set. """ is_training = ys is not None ...
[ "def", "predict", "(", "self", ",", "xs", ",", "ys", "=", "None", ",", "cands", "=", "None", ",", "cands_txt", "=", "None", ",", "obs", "=", "None", ")", ":", "is_training", "=", "ys", "is", "not", "None", "if", "is_training", ":", "negs", "=", "...
[ 396, 4 ]
[ 452, 37 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.vectorize
(self, observations)
Convert a list of observations into input & target tensors.
Convert a list of observations into input & target tensors.
def vectorize(self, observations): """ Convert a list of observations into input & target tensors. """ def valid(obs): # check if this is an example our model should actually process return 'text2vec' in obs and len(obs['text2vec']) > 0 try: ...
[ "def", "vectorize", "(", "self", ",", "observations", ")", ":", "def", "valid", "(", "obs", ")", ":", "# check if this is an example our model should actually process", "return", "'text2vec'", "in", "obs", "and", "len", "(", "obs", "[", "'text2vec'", "]", ")", "...
[ 454, 4 ]
[ 520, 39 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.save
(self, path=None)
Save model parameters if model_file is set.
Save model parameters if model_file is set.
def save(self, path=None): """ Save model parameters if model_file is set. """ path = self.opt.get('model_file', None) if path is None else path if path and hasattr(self, 'model'): data = {} data['model'] = self.model.state_dict() data['optimiz...
[ "def", "save", "(", "self", ",", "path", "=", "None", ")", ":", "path", "=", "self", ".", "opt", ".", "get", "(", "'model_file'", ",", "None", ")", "if", "path", "is", "None", "else", "path", "if", "path", "and", "hasattr", "(", "self", ",", "'mo...
[ 549, 4 ]
[ 561, 43 ]
python
en
['en', 'error', 'th']
False
StarspaceAgent.load
(self, path)
Return opt and model states.
Return opt and model states.
def load(self, path): """ Return opt and model states. """ print('Loading existing model params from ' + path) import parlai.utils.pickle with PathManager.open(path, 'rb') as f: data = torch.load( f, map_location=lambda cpu, _: cpu, pickle_mod...
[ "def", "load", "(", "self", ",", "path", ")", ":", "print", "(", "'Loading existing model params from '", "+", "path", ")", "import", "parlai", ".", "utils", ".", "pickle", "with", "PathManager", ".", "open", "(", "path", ",", "'rb'", ")", "as", "f", ":"...
[ 563, 4 ]
[ 577, 49 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.all
(self)
Return all callbacks linked to this object. Returns: All callbacks in a dictionary callback_name: callback}. The callback is returned as a namedtuple to simplify manipulation.
Return all callbacks linked to this object.
def all(self): """ Return all callbacks linked to this object. Returns: All callbacks in a dictionary callback_name: callback}. The callback is returned as a namedtuple to simplify manipulation. """ callbacks = {} handler = type(self).script ...
[ "def", "all", "(", "self", ")", ":", "callbacks", "=", "{", "}", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "dicts", "=", "handler", ".", "get_callbacks", "(", "self", ".", "obj", ")", "for", "callback_name", ",", ...
[ 25, 4 ]
[ 47, 24 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.get
(self, callback_name)
Return the callbacks associated with this name. Args: callback_name (str): the name of the callback. Returns: A list of callbacks associated with this object and of this name. Note: This method returns a list of callback objects (namedtuple ...
Return the callbacks associated with this name.
def get(self, callback_name): """ Return the callbacks associated with this name. Args: callback_name (str): the name of the callback. Returns: A list of callbacks associated with this object and of this name. Note: This method returns a lis...
[ "def", "get", "(", "self", ",", "callback_name", ")", ":", "return", "self", ".", "all", "(", ")", ".", "get", "(", "callback_name", ",", "[", "]", ")" ]
[ 49, 4 ]
[ 65, 48 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.get_variable
(self, variable_name)
Return the variable value or None. Args: variable_name (str): the name of the variable. Returns: Either the variable's value or None.
Return the variable value or None.
def get_variable(self, variable_name): """ Return the variable value or None. Args: variable_name (str): the name of the variable. Returns: Either the variable's value or None. """ handler = type(self).script if handler: retu...
[ "def", "get_variable", "(", "self", ",", "variable_name", ")", ":", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "return", "handler", ".", "get_variable", "(", "variable_name", ")", "return", "None" ]
[ 67, 4 ]
[ 82, 19 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.add
(self, callback_name, code, author=None, valid=False, parameters="")
Add a new callback for this object. Args: callback_name (str): the name of the callback to add. code (str): the Python code associated with this callback. author (Character or Account, optional): the author of the callback. valid (bool, optional): should...
Add a new callback for this object.
def add(self, callback_name, code, author=None, valid=False, parameters=""): """ Add a new callback for this object. Args: callback_name (str): the name of the callback to add. code (str): the Python code associated with this callback. author (Character or Ac...
[ "def", "add", "(", "self", ",", "callback_name", ",", "code", ",", "author", "=", "None", ",", "valid", "=", "False", ",", "parameters", "=", "\"\"", ")", ":", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "return", ...
[ 84, 4 ]
[ 102, 112 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.edit
(self, callback_name, number, code, author=None, valid=False)
Edit an existing callback bound to this object. Args: callback_name (str): the name of the callback to edit. number (int): the callback number to be changed. code (str): the Python code associated with this callback. author (Character or Account, optiona...
Edit an existing callback bound to this object.
def edit(self, callback_name, number, code, author=None, valid=False): """ Edit an existing callback bound to this object. Args: callback_name (str): the name of the callback to edit. number (int): the callback number to be changed. code (str): the Python cod...
[ "def", "edit", "(", "self", ",", "callback_name", ",", "number", ",", "code", ",", "author", "=", "None", ",", "valid", "=", "False", ")", ":", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "return", "self", ".", "f...
[ 104, 4 ]
[ 125, 104 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.remove
(self, callback_name, number)
Delete the specified callback bound to this object. Args: callback_name (str): the name of the callback to delete. number (int): the number of the callback to delete. Raises: RuntimeError if the callback is locked.
Delete the specified callback bound to this object.
def remove(self, callback_name, number): """ Delete the specified callback bound to this object. Args: callback_name (str): the name of the callback to delete. number (int): the number of the callback to delete. Raises: RuntimeError if the callback i...
[ "def", "remove", "(", "self", ",", "callback_name", ",", "number", ")", ":", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "handler", ".", "del_callback", "(", "self", ".", "obj", ",", "callback_name", ",", "number", ")...
[ 127, 4 ]
[ 141, 65 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.call
(self, callback_name, *args, **kwargs)
Call the specified callback(s) bound to this object. Args: callback_name (str): the callback name to call. *args: additional variables for this callback. Kwargs: number (int, optional): call just a specific callback. parameters (str, optional): ...
Call the specified callback(s) bound to this object.
def call(self, callback_name, *args, **kwargs): """ Call the specified callback(s) bound to this object. Args: callback_name (str): the callback name to call. *args: additional variables for this callback. Kwargs: number (int, optional): call just a ...
[ "def", "call", "(", "self", ",", "callback_name", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "handler", "=", "type", "(", "self", ")", ".", "script", "if", "handler", ":", "return", "handler", ".", "call", "(", "self", ".", "obj", ",", ...
[ 143, 4 ]
[ 166, 19 ]
python
en
['en', 'error', 'th']
False
CallbackHandler.format_callback
(callback)
Return the callback namedtuple to represent the specified callback. Args: callback (dict): the callback definition. The callback given in argument should be a dictionary containing the expected fields for a callback (code, author, valid...).
Return the callback namedtuple to represent the specified callback.
def format_callback(callback): """ Return the callback namedtuple to represent the specified callback. Args: callback (dict): the callback definition. The callback given in argument should be a dictionary containing the expected fields for a callback (code, author, ...
[ "def", "format_callback", "(", "callback", ")", ":", "if", "\"obj\"", "not", "in", "callback", ":", "callback", "[", "\"obj\"", "]", "=", "None", "if", "\"name\"", "not", "in", "callback", ":", "callback", "[", "\"name\"", "]", "=", "\"unknown\"", "if", ...
[ 169, 4 ]
[ 201, 35 ]
python
en
['en', 'error', 'th']
False
Decreasing.fillcolor
(self)
Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. The 'fillcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rg...
Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. The 'fillcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rg...
def fillcolor(self): """ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. The 'fillcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') ...
[ "def", "fillcolor", "(", "self", ")", ":", "return", "self", "[", "\"fillcolor\"", "]" ]
[ 15, 4 ]
[ 67, 32 ]
python
en
['en', 'error', 'th']
False
Decreasing.line
(self)
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
def line(self): """ The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` - A dict of string/value properties that will be passed to the Line constructor Suppor...
[ "def", "line", "(", "self", ")", ":", "return", "self", "[", "\"line\"", "]" ]
[ 76, 4 ]
[ 96, 27 ]
python
en
['en', 'error', 'th']
False
Decreasing.__init__
(self, arg=None, fillcolor=None, line=None, **kwargs)
Construct a new Decreasing object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.candlestick.Decreasing` fillcolor Sets the fill color. Defaults to...
Construct a new Decreasing object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.candlestick.Decreasing` fillcolor Sets the fill color. Defaults to...
def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): """ Construct a new Decreasing object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.candlest...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "fillcolor", "=", "None", ",", "line", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Decreasing", ",", "self", ")", ".", "__init__", "(", "\"decreasing\"", ")", "if", "\...
[ 116, 4 ]
[ 182, 34 ]
python
en
['en', 'error', 'th']
False
Textfont.color
(self)
Sets the text font color of unselected points, applied only when a selection exists. 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%)...
Sets the text font color of unselected points, applied only when a selection exists. 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%)...
def color(self): """ Sets the text font color of unselected points, applied only when a selection exists. 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 s...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 66, 28 ]
python
en
['en', 'error', 'th']
False
Textfont.__init__
(self, arg=None, color=None, **kwargs)
Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.unselected.Textfont` color Sets the text font color of unsel...
Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.unselected.Textfont` color Sets the text font color of unsel...
def __init__(self, arg=None, color=None, **kwargs): """ Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.unselected.Textfo...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Textfont", ",", "self", ")", ".", "__init__", "(", "\"textfont\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", ...
[ 82, 4 ]
[ 140, 34 ]
python
en
['en', 'error', 'th']
False
_table_exists
(db_cursor, tablename)
Returns bool if table exists or not
Returns bool if table exists or not
def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" return tablename in connection.introspection.table_names()
[ "def", "_table_exists", "(", "db_cursor", ",", "tablename", ")", ":", "return", "tablename", "in", "connection", ".", "introspection", ".", "table_names", "(", ")" ]
[ 7, 0 ]
[ 9, 62 ]
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
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.scatterpolar.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.scatterpolar.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.scatterpolar.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.scatterpolar.Hoverlabel` align Sets the horizontal alignment of th...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel` align Sets the horizontal alignment of th...
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
load_json_dict
(filename, *args)
Checks if file exists. Returns {} if something fails.
Checks if file exists. Returns {} if something fails.
def load_json_dict(filename, *args): """Checks if file exists. Returns {} if something fails.""" data = {} if os.path.exists(filename): lock.acquire() with open(filename, "r") as f: try: data = _json.load(f) if not isinstance(data, dict): ...
[ "def", "load_json_dict", "(", "filename", ",", "*", "args", ")", ":", "data", "=", "{", "}", "if", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "lock", ".", "acquire", "(", ")", "with", "open", "(", "filename", ",", "\"r\"", ")", ...
[ 56, 0 ]
[ 71, 15 ]
python
en
['en', 'en', 'en']
True
save_json_dict
(filename, json_dict)
Save json to file. Error if path DNE, not a dict, or invalid json.
Save json to file. Error if path DNE, not a dict, or invalid json.
def save_json_dict(filename, json_dict): """Save json to file. Error if path DNE, not a dict, or invalid json.""" if isinstance(json_dict, dict): # this will raise a TypeError if something goes wrong json_string = _json.dumps(json_dict, indent=4) lock.acquire() with open(filename...
[ "def", "save_json_dict", "(", "filename", ",", "json_dict", ")", ":", "if", "isinstance", "(", "json_dict", ",", "dict", ")", ":", "# this will raise a TypeError if something goes wrong", "json_string", "=", "_json", ".", "dumps", "(", "json_dict", ",", "indent", ...
[ 74, 0 ]
[ 84, 70 ]
python
en
['en', 'en', 'en']
True
ensure_file_exists
(filename)
Given a valid filename, make sure it exists (will create if DNE).
Given a valid filename, make sure it exists (will create if DNE).
def ensure_file_exists(filename): """Given a valid filename, make sure it exists (will create if DNE).""" if not os.path.exists(filename): head, tail = os.path.split(filename) ensure_dir_exists(head) with open(filename, "w") as f: pass
[ "def", "ensure_file_exists", "(", "filename", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "head", ",", "tail", "=", "os", ".", "path", ".", "split", "(", "filename", ")", "ensure_dir_exists", "(", "head", ")", ...
[ 87, 0 ]
[ 93, 16 ]
python
en
['en', 'en', 'en']
True
ensure_dir_exists
(directory)
Given a valid directory path, make sure it exists.
Given a valid directory path, make sure it exists.
def ensure_dir_exists(directory): """Given a valid directory path, make sure it exists.""" if dir: if not os.path.isdir(directory): os.makedirs(directory)
[ "def", "ensure_dir_exists", "(", "directory", ")", ":", "if", "dir", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "directory", ")", ":", "os", ".", "makedirs", "(", "directory", ")" ]
[ 96, 0 ]
[ 100, 34 ]
python
en
['en', 'en', 'en']
True
Font.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Font.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Font.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Font.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg dict of properties compatible with this constructor or an inst...
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Font", ",", "self", ")", ".", "__init__", "(", "\"font\"",...
[ 143, 4 ]
[ 227, 34 ]
python
en
['en', 'error', 'th']
False
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\"", "]" ]
[ 15, 4 ]
[ 29, 28 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of all hover labels on graph 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 string (e...
Sets the background color of all hover labels on graph 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 string (e...
def bgcolor(self): """ Sets the background color of all hover labels on graph 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\"", "]" ]
[ 38, 4 ]
[ 88, 30 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolor
(self)
Sets the border color of all hover labels on graph. 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 string (...
Sets the border color of all hover labels on graph. 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 string (...
def bordercolor(self): """ Sets the border color of all hover labels on graph. 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%)'...
[ "def", "bordercolor", "(", "self", ")", ":", "return", "self", "[", "\"bordercolor\"", "]" ]
[ 97, 4 ]
[ 147, 34 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.font
(self)
Sets the default hover label font used by all traces on the graph. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font` - A dict of string/value properties that will be passed ...
Sets the default hover label font used by all traces on the graph. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font` - A dict of string/value properties that will be passed ...
def font(self): """ Sets the default hover label font used by all traces on the graph. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font` - A dict of string/value propert...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 156, 4 ]
[ 194, 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\"", "]" ]
[ 203, 4 ]
[ 220, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.__init__
( self, arg=None, align=None, bgcolor=None, bordercolor=None, font=None, namelength=None, **kwargs )
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Hoverlabel` align Sets the horizontal alignment of the text...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Hoverlabel` align Sets the horizontal alignment of the text...
def __init__( self, arg=None, align=None, bgcolor=None, bordercolor=None, font=None, namelength=None, **kwargs ): """ Construct a new Hoverlabel object Parameters ---------- arg dict of prope...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "align", "=", "None", ",", "bgcolor", "=", "None", ",", "bordercolor", "=", "None", ",", "font", "=", "None", ",", "namelength", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", ...
[ 252, 4 ]
[ 351, 34 ]
python
en
['en', 'error', 'th']
False
Marker.autocolorscale
(self)
Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default pal...
Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default pal...
def autocolorscale(self): """ Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `auto...
[ "def", "autocolorscale", "(", "self", ")", ":", "return", "self", "[", "\"autocolorscale\"", "]" ]
[ 39, 4 ]
[ 56, 37 ]
python
en
['en', 'error', 'th']
False
Marker.cauto
(self)
Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color`is set to a numerical array. Defaults to `false` when `marker.cmin` and `ma...
Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color`is set to a numerical array. Defaults to `false` when `marker.cmin` and `ma...
def cauto(self): """ Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color`is set to a numerical array. Defaults to `false...
[ "def", "cauto", "(", "self", ")", ":", "return", "self", "[", "\"cauto\"", "]" ]
[ 65, 4 ]
[ 81, 28 ]
python
en
['en', 'error', 'th']
False
Marker.cmax
(self)
Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well. The 'cmax' property is a number and may be specified as: ...
Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well. The 'cmax' property is a number and may be specified as: ...
def cmax(self): """ Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well. The 'cmax' property is a number and ...
[ "def", "cmax", "(", "self", ")", ":", "return", "self", "[", "\"cmax\"", "]" ]
[ 90, 4 ]
[ 104, 27 ]
python
en
['en', 'error', 'th']
False
Marker.cmid
(self)
Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color`. Has no effect when `marker.cauto` is `...
Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color`. Has no effect when `marker.cauto` is `...
def cmid(self): """ Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color`. Has no effe...
[ "def", "cmid", "(", "self", ")", ":", "return", "self", "[", "\"cmid\"", "]" ]
[ 113, 4 ]
[ 128, 27 ]
python
en
['en', 'error', 'th']
False
Marker.cmin
(self)
Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well. The 'cmin' property is a number and may be specified as: ...
Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well. The 'cmin' property is a number and may be specified as: ...
def cmin(self): """ Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well. The 'cmin' property is a number and ...
[ "def", "cmin", "(", "self", ")", ":", "return", "self", "[", "\"cmin\"", "]" ]
[ 137, 4 ]
[ 151, 27 ]
python
en
['en', 'error', 'th']
False
Marker.color
(self)
Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. The 'color' property is a color and may be specified as: ...
Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. The 'color' property is a color and may be specified as: ...
def color(self): """ Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. The 'color' property is a colo...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 160, 4 ]
[ 216, 28 ]
python
en
['en', 'error', 'th']
False
Marker.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\"", "]" ]
[ 225, 4 ]
[ 243, 32 ]
python
en
['en', 'error', 'th']
False
Marker.colorbar
(self)
The 'colorbar' property is an instance of ColorBar that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar` - A dict of string/value properties that will be passed to the ColorBar constructor Supported dict propert...
The 'colorbar' property is an instance of ColorBar that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar` - A dict of string/value properties that will be passed to the ColorBar constructor Supported dict propert...
def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar` - A dict of string/value properties that will be passed to the ColorBar constructor ...
[ "def", "colorbar", "(", "self", ")", ":", "return", "self", "[", "\"colorbar\"", "]" ]
[ 252, 4 ]
[ 479, 31 ]
python
en
['en', 'error', 'th']
False
Marker.colorscale
(self)
Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) v...
Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) v...
def colorscale(self): """ Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for ...
[ "def", "colorscale", "(", "self", ")", ":", "return", "self", "[", "\"colorscale\"", "]" ]
[ 488, 4 ]
[ 532, 33 ]
python
en
['en', 'error', 'th']
False
Marker.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\"", "]" ]
[ 541, 4 ]
[ 552, 31 ]
python
en
['en', 'error', 'th']
False
Marker.gradient
(self)
The 'gradient' property is an instance of Gradient that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient` - A dict of string/value properties that will be passed to the Gradient constructor Supported dict propert...
The 'gradient' property is an instance of Gradient that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient` - A dict of string/value properties that will be passed to the Gradient constructor Supported dict propert...
def gradient(self): """ The 'gradient' property is an instance of Gradient that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient` - A dict of string/value properties that will be passed to the Gradient constructor ...
[ "def", "gradient", "(", "self", ")", ":", "return", "self", "[", "\"gradient\"", "]" ]
[ 561, 4 ]
[ 589, 31 ]
python
en
['en', 'error', 'th']
False
Marker.line
(self)
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
def line(self): """ The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported d...
[ "def", "line", "(", "self", ")", ":", "return", "self", "[", "\"line\"", "]" ]
[ 598, 4 ]
[ 701, 27 ]
python
en
['en', 'error', 'th']
False
Marker.opacity
(self)
Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray
Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] - A tuple, list, or one-dimensional numpy array of the above
def opacity(self): """ Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndar...
[ "def", "opacity", "(", "self", ")", ":", "return", "self", "[", "\"opacity\"", "]" ]
[ 710, 4 ]
[ 722, 30 ]
python
en
['en', 'error', 'th']
False
Marker.opacitysrc
(self)
Sets the source reference on Chart Studio Cloud for opacity . The 'opacitysrc' 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 opacity . The 'opacitysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def opacitysrc(self): """ Sets the source reference on Chart Studio Cloud for opacity . The 'opacitysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["opacitysrc"]
[ "def", "opacitysrc", "(", "self", ")", ":", "return", "self", "[", "\"opacitysrc\"", "]" ]
[ 731, 4 ]
[ 742, 33 ]
python
en
['en', 'error', 'th']
False
Marker.reversescale
(self)
Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color. The 'reversescale' property must be specified ...
Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color. The 'reversescale' property must be specified ...
def reversescale(self): """ Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color. The 'revers...
[ "def", "reversescale", "(", "self", ")", ":", "return", "self", "[", "\"reversescale\"", "]" ]
[ 751, 4 ]
[ 765, 35 ]
python
en
['en', 'error', 'th']
False
Marker.showscale
(self)
Determines whether or not a colorbar is displayed for this trace. Has an effect only if in `marker.color`is set to a numerical array. The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not a colorbar is displayed for this trace. Has an effect only if in `marker.color`is set to a numerical array. The 'showscale' property must be specified as a bool (either True, or False)
def showscale(self): """ Determines whether or not a colorbar is displayed for this trace. Has an effect only if in `marker.color`is set to a numerical array. The 'showscale' property must be specified as a bool (either True, or False) Returns ------...
[ "def", "showscale", "(", "self", ")", ":", "return", "self", "[", "\"showscale\"", "]" ]
[ 774, 4 ]
[ 787, 32 ]
python
en
['en', 'error', 'th']
False
Marker.size
(self)
Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray
Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] - A tuple, list, or one-dimensional numpy array of the above
def size(self): """ Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.nda...
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 796, 4 ]
[ 808, 27 ]
python
en
['en', 'error', 'th']
False
Marker.sizemin
(self)
Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points. The 'sizemin' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- in...
Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points. The 'sizemin' property is a number and may be specified as: - An int or float in the interval [0, inf]
def sizemin(self): """ Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points. The 'sizemin' property is a number and may be specified as: - An int or float in the interval [0, inf] Retu...
[ "def", "sizemin", "(", "self", ")", ":", "return", "self", "[", "\"sizemin\"", "]" ]
[ 817, 4 ]
[ 830, 30 ]
python
en
['en', 'error', 'th']
False
Marker.sizemode
(self)
Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels. The 'sizemode' property is an enumeration that may be specified as: - One of the following enumeration values: ['diameter', ...
Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels. The 'sizemode' property is an enumeration that may be specified as: - One of the following enumeration values: ['diameter', ...
def sizemode(self): """ Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels. The 'sizemode' property is an enumeration that may be specified as: - One of the following enumeration values...
[ "def", "sizemode", "(", "self", ")", ":", "return", "self", "[", "\"sizemode\"", "]" ]
[ 839, 4 ]
[ 853, 31 ]
python
en
['en', 'error', 'th']
False
Marker.sizeref
(self)
Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`. The 'sizeref' property is a number and may be specified as: - An int or float Returns ...
Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`. The 'sizeref' property is a number and may be specified as: - An int or float
def sizeref(self): """ Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`. The 'sizeref' property is a number and may be specified as: - An i...
[ "def", "sizeref", "(", "self", ")", ":", "return", "self", "[", "\"sizeref\"", "]" ]
[ 862, 4 ]
[ 875, 30 ]
python
en
['en', 'error', 'th']
False
Marker.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\"", "]" ]
[ 884, 4 ]
[ 895, 30 ]
python
en
['en', 'error', 'th']
False
Marker.symbol
(self)
Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'symbol' property is an enumerat...
Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'symbol' property is an enumerat...
def symbol(self): """ Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'sy...
[ "def", "symbol", "(", "self", ")", ":", "return", "self", "[", "\"symbol\"", "]" ]
[ 904, 4 ]
[ 980, 29 ]
python
en
['en', 'error', 'th']
False
Marker.symbolsrc
(self)
Sets the source reference on Chart Studio Cloud for symbol . The 'symbolsrc' 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 symbol . The 'symbolsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def symbolsrc(self): """ Sets the source reference on Chart Studio Cloud for symbol . The 'symbolsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["symbolsrc"]
[ "def", "symbolsrc", "(", "self", ")", ":", "return", "self", "[", "\"symbolsrc\"", "]" ]
[ 989, 4 ]
[ 1000, 32 ]
python
en
['en', 'error', 'th']
False
Marker.__init__
( self, arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorbar=None, colorscale=None, colorsrc=None, gradient=None, line=None, opacity=None, ...
Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Marker` autocolorscale Determines whether the colorscale is...
Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Marker` autocolorscale Determines whether the colorscale is...
def __init__( self, arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorbar=None, colorscale=None, colorsrc=None, gradient=None, line=None, opa...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "autocolorscale", "=", "None", ",", "cauto", "=", "None", ",", "cmax", "=", "None", ",", "cmid", "=", "None", ",", "cmin", "=", "None", ",", "color", "=", "None", ",", "coloraxis", "=", ...
[ 1127, 4 ]
[ 1411, 34 ]
python
en
['en', 'error', 'th']
False
Title.font
(self)
Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` ...
Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` ...
def font(self): """ Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.splom.marker...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 15, 4 ]
[ 53, 27 ]
python
en
['en', 'error', 'th']
False
Title.side
(self)
Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values...
Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values...
def side(self): """ Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the f...
[ "def", "side", "(", "self", ")", ":", "return", "self", "[", "\"side\"", "]" ]
[ 62, 4 ]
[ 76, 27 ]
python
en
['en', 'error', 'th']
False
Title.text
(self)
Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A ...
Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A ...
def text(self): """ Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: ...
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 85, 4 ]
[ 99, 27 ]
python
en
['en', 'error', 'th']
False