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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
DefaultTeacher.next_example | (self) |
Returns the next example from this dataset after starting to queue up the next
example.
|
Returns the next example from this dataset after starting to queue up the next
example.
| def next_example(self):
"""
Returns the next example from this dataset after starting to queue up the next
example.
"""
ready = None
# pull up the currently queued example
if self.example is not None:
if self.image_mode != 'no_image_model' and 'image_i... | [
"def",
"next_example",
"(",
"self",
")",
":",
"ready",
"=",
"None",
"# pull up the currently queued example",
"if",
"self",
".",
"example",
"is",
"not",
"None",
":",
"if",
"self",
".",
"image_mode",
"!=",
"'no_image_model'",
"and",
"'image_id'",
"in",
"self",
... | [
119,
4
] | [
142,
24
] | python | en | ['en', 'error', 'th'] | False |
test_network_monitor_suspension_by_another_steward | (looper,
sdk_pool_handle,
sdk_wallet_steward,
sdk_wallet_trustee,
sdk_wallet_handle,
... | Adding new steward | Adding new steward | def test_network_monitor_suspension_by_another_steward(looper,
sdk_pool_handle,
sdk_wallet_steward,
sdk_wallet_trustee,
... | [
"def",
"test_network_monitor_suspension_by_another_steward",
"(",
"looper",
",",
"sdk_pool_handle",
",",
"sdk_wallet_steward",
",",
"sdk_wallet_trustee",
",",
"sdk_wallet_handle",
",",
"with_verkey",
")",
":",
"new_steward_did",
",",
"new_steward_verkey",
"=",
"looper",
"."... | [
11,
0
] | [
50,
105
] | python | en | ['en', 'cy', 'en'] | True |
test_network_monitor_suspension_by_itself | (looper,
sdk_pool_handle,
sdk_wallet_steward,
sdk_wallet_handle,
with_verkey) | Adding NETWORK_MONITOR role by steward | Adding NETWORK_MONITOR role by steward | def test_network_monitor_suspension_by_itself(looper,
sdk_pool_handle,
sdk_wallet_steward,
sdk_wallet_handle,
with_verkey):
new_netw... | [
"def",
"test_network_monitor_suspension_by_itself",
"(",
"looper",
",",
"sdk_pool_handle",
",",
"sdk_wallet_steward",
",",
"sdk_wallet_handle",
",",
"with_verkey",
")",
":",
"new_network_monitor_did",
",",
"new_network_monitor_verkey",
"=",
"looper",
".",
"loop",
".",
"ru... | [
53,
0
] | [
77,
48
] | python | en | ['en', 'cy', 'en'] | True |
TradeTimeout.at_script_creation | (self) |
Called when script is first created
|
Called when script is first created
| def at_script_creation(self):
"""
Called when script is first created
"""
self.key = "trade_request_timeout"
self.desc = "times out trade requests"
self.interval = TRADE_TIMEOUT
self.start_delay = True
self.repeats = 1
self.persistent = False | [
"def",
"at_script_creation",
"(",
"self",
")",
":",
"self",
".",
"key",
"=",
"\"trade_request_timeout\"",
"self",
".",
"desc",
"=",
"\"times out trade requests\"",
"self",
".",
"interval",
"=",
"TRADE_TIMEOUT",
"self",
".",
"start_delay",
"=",
"True",
"self",
".... | [
108,
4
] | [
117,
31
] | python | en | ['en', 'error', 'th'] | False |
TradeTimeout.at_repeat | (self) |
called once
|
called once
| def at_repeat(self):
"""
called once
"""
if self.ndb.tradeevent:
self.obj.ndb.tradeevent.finish(force=True)
self.obj.msg("Trade request timed out.") | [
"def",
"at_repeat",
"(",
"self",
")",
":",
"if",
"self",
".",
"ndb",
".",
"tradeevent",
":",
"self",
".",
"obj",
".",
"ndb",
".",
"tradeevent",
".",
"finish",
"(",
"force",
"=",
"True",
")",
"self",
".",
"obj",
".",
"msg",
"(",
"\"Trade request timed... | [
119,
4
] | [
125,
48
] | python | en | ['en', 'error', 'th'] | False |
TradeTimeout.is_valid | (self) |
Only valid if the trade has not yet started
|
Only valid if the trade has not yet started
| def is_valid(self):
"""
Only valid if the trade has not yet started
"""
return self.obj.ndb.tradeevent and not self.obj.ndb.tradeevent.trade_started | [
"def",
"is_valid",
"(",
"self",
")",
":",
"return",
"self",
".",
"obj",
".",
"ndb",
".",
"tradeevent",
"and",
"not",
"self",
".",
"obj",
".",
"ndb",
".",
"tradeevent",
".",
"trade_started"
] | [
127,
4
] | [
131,
84
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.__init__ | (self, part_a, part_b) |
Initializes the trade. This is called when part A tries to
initiate a trade with part B. The trade will not start until
part B repeats this command (B will then call the self.join()
command)
Args:
part_a (object): The party trying to start barter.
part_b... |
Initializes the trade. This is called when part A tries to
initiate a trade with part B. The trade will not start until
part B repeats this command (B will then call the self.join()
command) | def __init__(self, part_a, part_b):
"""
Initializes the trade. This is called when part A tries to
initiate a trade with part B. The trade will not start until
part B repeats this command (B will then call the self.join()
command)
Args:
part_a (object): The p... | [
"def",
"__init__",
"(",
"self",
",",
"part_a",
",",
"part_b",
")",
":",
"# parties",
"self",
".",
"part_a",
"=",
"part_a",
"self",
".",
"part_b",
"=",
"part_b",
"self",
".",
"part_a",
".",
"cmdset",
".",
"add",
"(",
"CmdsetTrade",
"(",
")",
")",
"sel... | [
140,
4
] | [
167,
36
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.msg_other | (self, sender, string) |
Relay a message to the *other* party without needing to know
which party that is. This allows the calling command to not
have to worry about which party they are in the handler.
Args:
sender (object): One of A or B. The method will figure
out the *other* par... |
Relay a message to the *other* party without needing to know
which party that is. This allows the calling command to not
have to worry about which party they are in the handler. | def msg_other(self, sender, string):
"""
Relay a message to the *other* party without needing to know
which party that is. This allows the calling command to not
have to worry about which party they are in the handler.
Args:
sender (object): One of A or B. The method... | [
"def",
"msg_other",
"(",
"self",
",",
"sender",
",",
"string",
")",
":",
"if",
"self",
".",
"part_a",
"==",
"sender",
":",
"self",
".",
"part_b",
".",
"msg",
"(",
"string",
")",
"elif",
"self",
".",
"part_b",
"==",
"sender",
":",
"self",
".",
"part... | [
169,
4
] | [
186,
69
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.get_other | (self, party) |
Returns the other party of the trade
Args:
party (object): One of the parties of the negotiation
Returns:
party_other (object): The other party, not the first party.
|
Returns the other party of the trade | def get_other(self, party):
"""
Returns the other party of the trade
Args:
party (object): One of the parties of the negotiation
Returns:
party_other (object): The other party, not the first party.
"""
if self.part_a == party:
return... | [
"def",
"get_other",
"(",
"self",
",",
"party",
")",
":",
"if",
"self",
".",
"part_a",
"==",
"party",
":",
"return",
"self",
".",
"part_b",
"if",
"self",
".",
"part_b",
"==",
"party",
":",
"return",
"self",
".",
"part_a",
"return",
"None"
] | [
188,
4
] | [
203,
19
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.join | (self, part_b) |
This is used once B decides to join the trade
Args:
part_b (object): The party accepting the barter.
|
This is used once B decides to join the trade | def join(self, part_b):
"""
This is used once B decides to join the trade
Args:
part_b (object): The party accepting the barter.
"""
if self.part_b == part_b:
self.part_b.ndb.tradehandler = self
self.part_b.cmdset.add(CmdsetTrade())
... | [
"def",
"join",
"(",
"self",
",",
"part_b",
")",
":",
"if",
"self",
".",
"part_b",
"==",
"part_b",
":",
"self",
".",
"part_b",
".",
"ndb",
".",
"tradehandler",
"=",
"self",
"self",
".",
"part_b",
".",
"cmdset",
".",
"add",
"(",
"CmdsetTrade",
"(",
"... | [
205,
4
] | [
218,
20
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.unjoin | (self, part_b) |
This is used if B decides not to join the trade.
Args:
part_b (object): The party leaving the barter.
|
This is used if B decides not to join the trade. | def unjoin(self, part_b):
"""
This is used if B decides not to join the trade.
Args:
part_b (object): The party leaving the barter.
"""
if self.part_b == part_b:
self.finish(force=True)
return True
return False | [
"def",
"unjoin",
"(",
"self",
",",
"part_b",
")",
":",
"if",
"self",
".",
"part_b",
"==",
"part_b",
":",
"self",
".",
"finish",
"(",
"force",
"=",
"True",
")",
"return",
"True",
"return",
"False"
] | [
220,
4
] | [
231,
20
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.offer | (self, party, *args) |
Change the current standing offer. We leave it up to the
command to do the actual checks that the offer consists
of real, valid, objects.
Args:
party (object): Who is making the offer
args (objects or str): Offerings.
|
Change the current standing offer. We leave it up to the
command to do the actual checks that the offer consists
of real, valid, objects. | def offer(self, party, *args):
"""
Change the current standing offer. We leave it up to the
command to do the actual checks that the offer consists
of real, valid, objects.
Args:
party (object): Who is making the offer
args (objects or str): Offerings.
... | [
"def",
"offer",
"(",
"self",
",",
"party",
",",
"*",
"args",
")",
":",
"if",
"self",
".",
"trade_started",
":",
"# reset accept statements whenever an offer changes",
"self",
".",
"part_a_accepted",
"=",
"False",
"self",
".",
"part_b_accepted",
"=",
"False",
"if... | [
233,
4
] | [
253,
32
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.list | (self) |
List current offers.
Returns:
offers (tuple): A tuple with two lists, (A_offers, B_offers).
|
List current offers. | def list(self):
"""
List current offers.
Returns:
offers (tuple): A tuple with two lists, (A_offers, B_offers).
"""
return self.part_a_offers, self.part_b_offers | [
"def",
"list",
"(",
"self",
")",
":",
"return",
"self",
".",
"part_a_offers",
",",
"self",
".",
"part_b_offers"
] | [
255,
4
] | [
263,
53
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.search | (self, offername) |
Search current offers.
Args:
offername (str or int): Object to search for, or its index in
the list of offered items.
Returns:
offer (object): An object on offer, based on the search criterion.
|
Search current offers. | def search(self, offername):
"""
Search current offers.
Args:
offername (str or int): Object to search for, or its index in
the list of offered items.
Returns:
offer (object): An object on offer, based on the search criterion.
"""
... | [
"def",
"search",
"(",
"self",
",",
"offername",
")",
":",
"all_offers",
"=",
"self",
".",
"part_a_offers",
"+",
"self",
".",
"part_b_offers",
"if",
"isinstance",
"(",
"offername",
",",
"int",
")",
":",
"# an index to return",
"if",
"0",
"<=",
"offername",
... | [
265,
4
] | [
291,
19
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.accept | (self, party) |
Accept the current offer.
Args:
party (object): The party accepting the deal.
Returns:
result (object): `True` if this closes the deal, `False`
otherwise
Notes:
This will only close the deal if both parties have
accepted... |
Accept the current offer. | def accept(self, party):
"""
Accept the current offer.
Args:
party (object): The party accepting the deal.
Returns:
result (object): `True` if this closes the deal, `False`
otherwise
Notes:
This will only close the deal if bo... | [
"def",
"accept",
"(",
"self",
",",
"party",
")",
":",
"if",
"self",
".",
"trade_started",
":",
"if",
"party",
"==",
"self",
".",
"part_a",
":",
"self",
".",
"part_a_accepted",
"=",
"True",
"elif",
"party",
"==",
"self",
".",
"part_b",
":",
"self",
".... | [
293,
4
] | [
318,
20
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.decline | (self, party) |
Decline the offer (or change one's mind).
Args:
party (object): Party declining the deal.
Returns:
did_decline (bool): `True` if there was really an
`accepted` status to change, `False` otherwise.
Notes:
If previously having used th... |
Decline the offer (or change one's mind). | def decline(self, party):
"""
Decline the offer (or change one's mind).
Args:
party (object): Party declining the deal.
Returns:
did_decline (bool): `True` if there was really an
`accepted` status to change, `False` otherwise.
Notes:
... | [
"def",
"decline",
"(",
"self",
",",
"party",
")",
":",
"if",
"self",
".",
"trade_started",
":",
"if",
"party",
"==",
"self",
".",
"part_a",
":",
"if",
"self",
".",
"part_a_accepted",
":",
"self",
".",
"part_a_accepted",
"=",
"False",
"return",
"True",
... | [
320,
4
] | [
350,
20
] | python | en | ['en', 'error', 'th'] | False |
TradeHandler.finish | (self, force=False) |
Conclude trade - move all offers and clean up
Args:
force (bool, optional): Force cleanup regardless of if the
trade was accepted or not (if not, no goods will change
hands but trading will stop anyway)
Returns:
result (bool): If the fini... |
Conclude trade - move all offers and clean up | def finish(self, force=False):
"""
Conclude trade - move all offers and clean up
Args:
force (bool, optional): Force cleanup regardless of if the
trade was accepted or not (if not, no goods will change
hands but trading will stop anyway)
Retur... | [
"def",
"finish",
"(",
"self",
",",
"force",
"=",
"False",
")",
":",
"fin",
"=",
"False",
"if",
"self",
".",
"trade_started",
"and",
"self",
".",
"part_a_accepted",
"and",
"self",
".",
"part_b_accepted",
":",
"# both accepted - move objects before cleanup",
"for"... | [
352,
4
] | [
384,
20
] | python | en | ['en', 'error', 'th'] | False |
CmdTradeBase.parse | (self) |
Parse the relevant parts and make it easily
available to the command
|
Parse the relevant parts and make it easily
available to the command
| def parse(self):
"""
Parse the relevant parts and make it easily
available to the command
"""
self.args = self.args.strip()
self.tradehandler = self.caller.ndb.tradehandler
self.part_a = self.tradehandler.part_a
self.part_b = self.tradehandler.part_b
... | [
"def",
"parse",
"(",
"self",
")",
":",
"self",
".",
"args",
"=",
"self",
".",
"args",
".",
"strip",
"(",
")",
"self",
".",
"tradehandler",
"=",
"self",
".",
"caller",
".",
"ndb",
".",
"tradehandler",
"self",
".",
"part_a",
"=",
"self",
".",
"tradeh... | [
396,
4
] | [
419,
90
] | python | en | ['en', 'error', 'th'] | False |
CmdTradeHelp.func | (self) | Show the help | Show the help | def func(self):
"""Show the help"""
string = """
Trading commands
|woffer <objects> [:emote]|n
offer one or more objects for trade. The emote can be used for
RP/arguments. A new offer will require both parties to re-accept
it again.
|waccept [... | [
"def",
"func",
"(",
"self",
")",
":",
"string",
"=",
"\"\"\"\n Trading commands\n\n |woffer <objects> [:emote]|n\n offer one or more objects for trade. The emote can be used for\n RP/arguments. A new offer will require both parties to re-accept\n it aga... | [
437,
4
] | [
464,
31
] | python | en | ['en', 'en', 'en'] | True |
CmdOffer.func | (self) | implement the offer | implement the offer | def func(self):
"""implement the offer"""
caller = self.caller
if not self.args:
caller.msg("Usage: offer <object> [, object2, ...] [:emote]")
return
if not self.trade_started:
caller.msg("Wait until the other party has accepted to trade with you.")
... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"if",
"not",
"self",
".",
"args",
":",
"caller",
".",
"msg",
"(",
"\"Usage: offer <object> [, object2, ...] [:emote]\"",
")",
"return",
"if",
"not",
"self",
".",
"trade_started",
":"... | [
483,
4
] | [
511,
77
] | python | en | ['en', 'en', 'en'] | True |
CmdAccept.func | (self) | accept the offer | accept the offer | def func(self):
"""accept the offer"""
caller = self.caller
if not self.trade_started:
caller.msg("Wait until the other party has accepted to trade with you.")
return
if self.tradehandler.accept(self.caller):
# deal finished. Trade ended and cleaned.
... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"if",
"not",
"self",
".",
"trade_started",
":",
"caller",
".",
"msg",
"(",
"\"Wait until the other party has accepted to trade with you.\"",
")",
"return",
"if",
"self",
".",
"tradehandl... | [
534,
4
] | [
548,
119
] | python | en | ['en', 'en', 'en'] | True |
CmdDecline.func | (self) | decline the offer | decline the offer | def func(self):
"""decline the offer"""
caller = self.caller
if not self.trade_started:
caller.msg("Wait until the other party has accepted to trade with you.")
return
offer_a, offer_b = self.tradehandler.list()
if not offer_a or not offer_b:
c... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"if",
"not",
"self",
".",
"trade_started",
":",
"caller",
".",
"msg",
"(",
"\"Wait until the other party has accepted to trade with you.\"",
")",
"return",
"offer_a",
",",
"offer_b",
"="... | [
569,
4
] | [
587,
98
] | python | en | ['en', 'en', 'en'] | True |
CmdEvaluate.func | (self) | evaluate an object | evaluate an object | def func(self):
"""evaluate an object"""
caller = self.caller
if not self.args:
caller.msg("Usage: evaluate <offered object>")
return
# we also accept indices
try:
ind = int(self.args)
self.args = ind - 1
except Exception:
... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"if",
"not",
"self",
".",
"args",
":",
"caller",
".",
"msg",
"(",
"\"Usage: evaluate <offered object>\"",
")",
"return",
"# we also accept indices",
"try",
":",
"ind",
"=",
"int",
... | [
612,
4
] | [
631,
33
] | python | en | ['en', 'en', 'en'] | True |
CmdStatus.func | (self) | Show the current deal | Show the current deal | def func(self):
"""Show the current deal"""
caller = self.caller
part_a_offers, part_b_offers = self.tradehandler.list()
count = 1
part_a_offerlist = []
for offer in part_a_offers:
part_a_offerlist.append("\n |w%i|n %s" % (count, offer.key))
count ... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"part_a_offers",
",",
"part_b_offers",
"=",
"self",
".",
"tradehandler",
".",
"list",
"(",
")",
"count",
"=",
"1",
"part_a_offerlist",
"=",
"[",
"]",
"for",
"offer",
"in",
"par... | [
655,
4
] | [
681,
26
] | python | en | ['en', 'en', 'en'] | True |
CmdsetTrade.at_cmdset_creation | (self) | Called when cmdset is created | Called when cmdset is created | def at_cmdset_creation(self):
"""Called when cmdset is created"""
self.add(CmdTradeHelp())
self.add(CmdOffer())
self.add(CmdAccept())
self.add(CmdDecline())
self.add(CmdEvaluate())
self.add(CmdStatus())
self.add(CmdFinish()) | [
"def",
"at_cmdset_creation",
"(",
"self",
")",
":",
"self",
".",
"add",
"(",
"CmdTradeHelp",
"(",
")",
")",
"self",
".",
"add",
"(",
"CmdOffer",
"(",
")",
")",
"self",
".",
"add",
"(",
"CmdAccept",
"(",
")",
")",
"self",
".",
"add",
"(",
"CmdDeclin... | [
719,
4
] | [
727,
29
] | python | en | ['en', 'de', 'en'] | True |
CmdTrade.func | (self) | Initiate trade | Initiate trade | def func(self):
"""Initiate trade"""
if not self.args:
if self.caller.ndb.tradehandler and self.caller.ndb.tradeevent.trade_started:
self.caller.msg("You are already in a trade. Use 'end trade' to abort it.")
else:
self.caller.msg("Usage: trade <o... | [
"def",
"func",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"args",
":",
"if",
"self",
".",
"caller",
".",
"ndb",
".",
"tradehandler",
"and",
"self",
".",
"caller",
".",
"ndb",
".",
"tradeevent",
".",
"trade_started",
":",
"self",
".",
"caller",
... | [
754,
4
] | [
848,
18
] | python | co | ['en', 'co', 'it'] | False |
ScanNetData.get_infos | (self, num_workers=4, has_label=True, sample_id_list=None) | Get data infos.
This method gets information from the raw data.
Args:
num_workers (int): Number of threads to be used. Default: 4.
has_label (bool): Whether the data has label. Default: True.
sample_id_list (list[int]): Index list of the sample.
Defa... | Get data infos. | def get_infos(self, num_workers=4, has_label=True, sample_id_list=None):
"""Get data infos.
This method gets information from the raw data.
Args:
num_workers (int): Number of threads to be used. Default: 4.
has_label (bool): Whether the data has label. Default: True.
... | [
"def",
"get_infos",
"(",
"self",
",",
"num_workers",
"=",
"4",
",",
"has_label",
"=",
"True",
",",
"sample_id_list",
"=",
"None",
")",
":",
"def",
"process_single_scene",
"(",
"sample_idx",
")",
":",
"print",
"(",
"f'{self.split} sample_idx: {sample_idx}'",
")",... | [
49,
4
] | [
128,
26
] | python | en | ['fr', 'lb', 'en'] | False |
Insidetextfont.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 |
Insidetextfont.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 |
Insidetextfont.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 |
Insidetextfont.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 |
Insidetextfont.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 |
Insidetextfont.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 |
Insidetextfont.__init__ | (
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
) |
Construct a new Insidetextfont object
Sets the font used for `textinfo` lying inside the sector.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.sunburst.Insid... |
Construct a new Insidetextfont object
Sets the font used for `textinfo` lying inside the sector. | def __init__(
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
):
"""
Construct a new Insidetextfont object
Sets the font used for `textinfo` lying inside... | [
"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 |
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.sunburst.marke
r.colorbar.Tickfont`
... |
Construct a new Tickfont object
Sets the color bar's tick label font | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Tickfont object
Sets the color bar's tick label font
Parameters
----------
arg
dict of properties compatible with this constructor or
an insta... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"family",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Tickfont",
",",
"self",
")",
".",
"__init__",
"(",
"\"tick... | [
143,
4
] | [
226,
34
] | python | en | ['en', 'error', 'th'] | False |
make_html_safe | (s) | Replace any angled brackets in string s to avoid interfering with HTML attention visualizer. | Replace any angled brackets in string s to avoid interfering with HTML attention visualizer. | def make_html_safe(s):
"""Replace any angled brackets in string s to avoid interfering with HTML attention visualizer."""
s.replace("<", "<")
s.replace(">", ">")
return s | [
"def",
"make_html_safe",
"(",
"s",
")",
":",
"s",
".",
"replace",
"(",
"\"<\"",
",",
"\"<\"",
")",
"s",
".",
"replace",
"(",
"\">\"",
",",
"\">\"",
")",
"return",
"s"
] | [
20,
0
] | [
24,
12
] | python | en | ['en', 'en', 'en'] | True |
Outsidetextfont.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 |
Outsidetextfont.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 |
Outsidetextfont.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 |
Outsidetextfont.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 |
Outsidetextfont.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 |
Outsidetextfont.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 |
Outsidetextfont.__init__ | (
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
) |
Construct a new Outsidetextfont object
Sets the font used for `textinfo` lying outside the sector.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.pie.Outsidet... |
Construct a new Outsidetextfont object
Sets the font used for `textinfo` lying outside the sector. | def __init__(
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
):
"""
Construct a new Outsidetextfont object
Sets the font used for `textinfo` lying outsi... | [
"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 |
quality_focal_loss | (pred, target, beta=2.0) | r"""Quality Focal Loss (QFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_.
Args:
pred (torch.Tensor): Predicted joint representation of classification
and quality (IoU) estimation with ... | r"""Quality Focal Loss (QFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_. | def quality_focal_loss(pred, target, beta=2.0):
r"""Quality Focal Loss (QFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_.
Args:
pred (torch.Tensor): Predicted joint representation of classific... | [
"def",
"quality_focal_loss",
"(",
"pred",
",",
"target",
",",
"beta",
"=",
"2.0",
")",
":",
"assert",
"len",
"(",
"target",
")",
"==",
"2",
",",
"\"\"\"target for QFL must be a tuple of two elements,\n including category label and quality label, respectively\"\"\"",
... | [
8,
0
] | [
48,
15
] | python | en | ['en', 'en', 'en'] | True |
distribution_focal_loss | (pred, label) | r"""Distribution Focal Loss (DFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_.
Args:
pred (torch.Tensor): Predicted general distribution of bounding boxes
(before softmax) with shape (... | r"""Distribution Focal Loss (DFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_. | def distribution_focal_loss(pred, label):
r"""Distribution Focal Loss (DFL) is from `Generalized Focal Loss: Learning
Qualified and Distributed Bounding Boxes for Dense Object Detection
<https://arxiv.org/abs/2006.04388>`_.
Args:
pred (torch.Tensor): Predicted general distribution of bounding b... | [
"def",
"distribution_focal_loss",
"(",
"pred",
",",
"label",
")",
":",
"dis_left",
"=",
"label",
".",
"long",
"(",
")",
"dis_right",
"=",
"dis_left",
"+",
"1",
"weight_left",
"=",
"dis_right",
".",
"float",
"(",
")",
"-",
"label",
"weight_right",
"=",
"l... | [
52,
0
] | [
73,
15
] | 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.sankey.node.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.sankey.node.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.sankey.node.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.sankey.node.Hoverlabel`
align
Sets the horizontal alignment of the... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.sankey.node.Hoverlabel`
align
Sets the horizontal alignment of the... | 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 |
generate_conflicting_plot_options_in_signin | () | sign_in overrides the default plot options.
conflicting options aren't raised until plot or iplot is called,
through _plot_option_logic
| sign_in overrides the default plot options.
conflicting options aren't raised until plot or iplot is called,
through _plot_option_logic
| def generate_conflicting_plot_options_in_signin():
"""sign_in overrides the default plot options.
conflicting options aren't raised until plot or iplot is called,
through _plot_option_logic
"""
def gen_test(plot_options):
def test(self):
py.sign_in("username", "key", **plot_opti... | [
"def",
"generate_conflicting_plot_options_in_signin",
"(",
")",
":",
"def",
"gen_test",
"(",
"plot_options",
")",
":",
"def",
"test",
"(",
"self",
")",
":",
"py",
".",
"sign_in",
"(",
"\"username\"",
",",
"\"key\"",
",",
"*",
"*",
"plot_options",
")",
"self"... | [
270,
0
] | [
288,
9
] | python | en | ['en', 'en', 'en'] | True |
generate_conflicting_plot_options_in_tools_dot_set_config | () | tls.set_config overrides the default plot options.
conflicting options are actually raised when the options are saved,
because we push out default arguments for folks, and we don't want to
require users to specify both world_readable and secret *and* we don't
want to raise an error if they specified onl... | tls.set_config overrides the default plot options.
conflicting options are actually raised when the options are saved,
because we push out default arguments for folks, and we don't want to
require users to specify both world_readable and secret *and* we don't
want to raise an error if they specified onl... | def generate_conflicting_plot_options_in_tools_dot_set_config():
"""tls.set_config overrides the default plot options.
conflicting options are actually raised when the options are saved,
because we push out default arguments for folks, and we don't want to
require users to specify both world_readable an... | [
"def",
"generate_conflicting_plot_options_in_tools_dot_set_config",
"(",
")",
":",
"def",
"gen_test",
"(",
"plot_options",
")",
":",
"def",
"test",
"(",
"self",
")",
":",
"self",
".",
"assertRaises",
"(",
"PlotlyError",
",",
"tls",
".",
"set_config_file",
",",
"... | [
294,
0
] | [
314,
9
] | python | en | ['en', 'ca', 'en'] | True |
generate_conflicting_plot_options_with_json_writes_of_config | () | if the user wrote their own options in the config file,
then we'll raise the error when the call plot or iplot through
_plot_option_logic
| if the user wrote their own options in the config file,
then we'll raise the error when the call plot or iplot through
_plot_option_logic
| def generate_conflicting_plot_options_with_json_writes_of_config():
""" if the user wrote their own options in the config file,
then we'll raise the error when the call plot or iplot through
_plot_option_logic
"""
def gen_test(plot_options):
def test(self):
config = _json.load(o... | [
"def",
"generate_conflicting_plot_options_with_json_writes_of_config",
"(",
")",
":",
"def",
"gen_test",
"(",
"plot_options",
")",
":",
"def",
"test",
"(",
"self",
")",
":",
"config",
"=",
"_json",
".",
"load",
"(",
"open",
"(",
"CONFIG_FILE",
")",
")",
"with"... | [
320,
0
] | [
341,
9
] | python | en | ['en', 'en', 'en'] | True |
generate_private_sharing_and_public_world_readable_precedence | () | Test that call signature arguments applied through _plot_option_logic
overwrite options supplied through py.sign_in which overwrite options
set through tls.set_config
| Test that call signature arguments applied through _plot_option_logic
overwrite options supplied through py.sign_in which overwrite options
set through tls.set_config
| def generate_private_sharing_and_public_world_readable_precedence():
""" Test that call signature arguments applied through _plot_option_logic
overwrite options supplied through py.sign_in which overwrite options
set through tls.set_config
"""
plot_option_sets = (
{
"parent": {"w... | [
"def",
"generate_private_sharing_and_public_world_readable_precedence",
"(",
")",
":",
"plot_option_sets",
"=",
"(",
"{",
"\"parent\"",
":",
"{",
"\"world_readable\"",
":",
"True",
",",
"\"auto_open\"",
":",
"False",
"}",
",",
"\"child\"",
":",
"{",
"\"sharing\"",
"... | [
347,
0
] | [
411,
9
] | python | en | ['en', 'en', 'en'] | True |
fig_to_vincent | (fig) | Convert a matplotlib figure to a vincent object | Convert a matplotlib figure to a vincent object | def fig_to_vincent(fig):
"""Convert a matplotlib figure to a vincent object"""
renderer = VincentRenderer()
exporter = Exporter(renderer)
exporter.run(fig)
return renderer.chart | [
"def",
"fig_to_vincent",
"(",
"fig",
")",
":",
"renderer",
"=",
"VincentRenderer",
"(",
")",
"exporter",
"=",
"Exporter",
"(",
"renderer",
")",
"exporter",
".",
"run",
"(",
"fig",
")",
"return",
"renderer",
".",
"chart"
] | [
46,
0
] | [
51,
25
] | python | en | ['en', 'lb', 'en'] | True |
Rangeslider.autorange | (self) |
Determines whether or not the range slider range is computed in
relation to the input data. If `range` is provided, then
`autorange` is set to False.
The 'autorange' property must be specified as a bool
(either True, or False)
Returns
-------
bool
... |
Determines whether or not the range slider range is computed in
relation to the input data. If `range` is provided, then
`autorange` is set to False.
The 'autorange' property must be specified as a bool
(either True, or False) | def autorange(self):
"""
Determines whether or not the range slider range is computed in
relation to the input data. If `range` is provided, then
`autorange` is set to False.
The 'autorange' property must be specified as a bool
(either True, or False)
Return... | [
"def",
"autorange",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"autorange\"",
"]"
] | [
24,
4
] | [
37,
32
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.bgcolor | (self) |
Sets the background color of the range slider.
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.g. 'hsv... |
Sets the background color of the range slider.
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.g. 'hsv... | def bgcolor(self):
"""
Sets the background color of the range slider.
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\"",
"]"
] | [
46,
4
] | [
96,
30
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.bordercolor | (self) |
Sets the border color of the range slider.
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 (e.g. 'hsv... |
Sets the border color of the range slider.
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 (e.g. 'hsv... | def bordercolor(self):
"""
Sets the border color of the range slider.
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\"",
"]"
] | [
105,
4
] | [
155,
34
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.borderwidth | (self) |
Sets the border width of the range slider.
The 'borderwidth' 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
|
Sets the border width of the range slider.
The 'borderwidth' 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 borderwidth(self):
"""
Sets the border width of the range slider.
The 'borderwidth' 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
... | [
"def",
"borderwidth",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"borderwidth\"",
"]"
] | [
164,
4
] | [
176,
34
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.range | (self) |
Sets the range of the range slider. If not set, defaults to the
full xaxis range. If the axis `type` is "log", then you must
take the log of your desired range. If the axis `type` is
"date", it should be date strings, like date data, though Date
objects and unix milliseconds wil... |
Sets the range of the range slider. If not set, defaults to the
full xaxis range. If the axis `type` is "log", then you must
take the log of your desired range. If the axis `type` is
"date", it should be date strings, like date data, though Date
objects and unix milliseconds wil... | def range(self):
"""
Sets the range of the range slider. If not set, defaults to the
full xaxis range. If the axis `type` is "log", then you must
take the log of your desired range. If the axis `type` is
"date", it should be date strings, like date data, though Date
objec... | [
"def",
"range",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"range\"",
"]"
] | [
185,
4
] | [
206,
28
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.thickness | (self) |
The height of the range slider as a fraction of the total plot
area height.
The 'thickness' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
|
The height of the range slider as a fraction of the total plot
area height.
The 'thickness' property is a number and may be specified as:
- An int or float in the interval [0, 1] | def thickness(self):
"""
The height of the range slider as a fraction of the total plot
area height.
The 'thickness' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
... | [
"def",
"thickness",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"thickness\"",
"]"
] | [
215,
4
] | [
227,
32
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.visible | (self) |
Determines whether or not the range slider will be visible. If
visible, perpendicular axes will be set to `fixedrange`
The 'visible' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not the range slider will be visible. If
visible, perpendicular axes will be set to `fixedrange`
The 'visible' property must be specified as a bool
(either True, or False) | def visible(self):
"""
Determines whether or not the range slider will be visible. If
visible, perpendicular axes will be set to `fixedrange`
The 'visible' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
... | [
"def",
"visible",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"visible\"",
"]"
] | [
236,
4
] | [
248,
30
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.yaxis | (self) |
The 'yaxis' property is an instance of YAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`
- A dict of string/value properties that will be passed
to the YAxis constructor
Supported dict properties:
... |
The 'yaxis' property is an instance of YAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`
- A dict of string/value properties that will be passed
to the YAxis constructor
Supported dict properties:
... | def yaxis(self):
"""
The 'yaxis' property is an instance of YAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`
- A dict of string/value properties that will be passed
to the YAxis constructor
... | [
"def",
"yaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"yaxis\"",
"]"
] | [
257,
4
] | [
283,
28
] | python | en | ['en', 'error', 'th'] | False |
Rangeslider.__init__ | (
self,
arg=None,
autorange=None,
bgcolor=None,
bordercolor=None,
borderwidth=None,
range=None,
thickness=None,
visible=None,
yaxis=None,
**kwargs
) |
Construct a new Rangeslider object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.xaxis.Rangeslider`
autorange
Determines whether or not the... |
Construct a new Rangeslider object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.xaxis.Rangeslider`
autorange
Determines whether or not the... | def __init__(
self,
arg=None,
autorange=None,
bgcolor=None,
bordercolor=None,
borderwidth=None,
range=None,
thickness=None,
visible=None,
yaxis=None,
**kwargs
):
"""
Construct a new Rangeslider object
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"autorange",
"=",
"None",
",",
"bgcolor",
"=",
"None",
",",
"bordercolor",
"=",
"None",
",",
"borderwidth",
"=",
"None",
",",
"range",
"=",
"None",
",",
"thickness",
"=",
"None",
",",
"vis... | [
326,
4
] | [
451,
34
] | python | en | ['en', 'error', 'th'] | False |
TestAnalysis.test_compile_results | (self) |
Test compiling results on a dummy set of data.
|
Test compiling results on a dummy set of data.
| def test_compile_results(self):
"""
Test compiling results on a dummy set of data.
"""
with testing_utils.tempdir() as tmpdir:
# Define expected stdout
# Paths
analysis_config_folder = os.path.join(
os.path.dirname(os.path.abspath(__... | [
"def",
"test_compile_results",
"(",
"self",
")",
":",
"with",
"testing_utils",
".",
"tempdir",
"(",
")",
"as",
"tmpdir",
":",
"# Define expected stdout",
"# Paths",
"analysis_config_folder",
"=",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"... | [
26,
4
] | [
173,
17
] | python | en | ['en', 'error', 'th'] | False |
Transition.duration | (self) |
Sets the duration of the slider transition
The 'duration' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the duration of the slider transition
The 'duration' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def duration(self):
"""
Sets the duration of the slider transition
The 'duration' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["duration"] | [
"def",
"duration",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"duration\"",
"]"
] | [
15,
4
] | [
26,
31
] | python | en | ['en', 'error', 'th'] | False |
Transition.easing | (self) |
Sets the easing function of the slider transition
The 'easing' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'quad', 'cubic', 'sin', 'exp', 'circle',
'elastic', 'back', 'bounce', 'linear-in', 'qu... |
Sets the easing function of the slider transition
The 'easing' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'quad', 'cubic', 'sin', 'exp', 'circle',
'elastic', 'back', 'bounce', 'linear-in', 'qu... | def easing(self):
"""
Sets the easing function of the slider transition
The 'easing' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'quad', 'cubic', 'sin', 'exp', 'circle',
'elastic', 'back... | [
"def",
"easing",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"easing\"",
"]"
] | [
35,
4
] | [
55,
29
] | python | en | ['en', 'error', 'th'] | False |
Transition.__init__ | (self, arg=None, duration=None, easing=None, **kwargs) |
Construct a new Transition object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.slider.Transition`
duration
Sets the duration of the slider... |
Construct a new Transition object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.slider.Transition`
duration
Sets the duration of the slider... | def __init__(self, arg=None, duration=None, easing=None, **kwargs):
"""
Construct a new Transition object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"duration",
"=",
"None",
",",
"easing",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Transition",
",",
"self",
")",
".",
"__init__",
"(",
"\"transition\"",
")",
"if",
"... | [
72,
4
] | [
135,
34
] | python | en | ['en', 'error', 'th'] | False |
Line.color | (self) |
Sets the line 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%)')
- ... |
Sets the line 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%)')
- ... | def color(self):
"""
Sets the line 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... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
65,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.dash | (self) |
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- One of the following strings:... |
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- One of the following strings:... | def dash(self):
"""
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- On... | [
"def",
"dash",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dash\"",
"]"
] | [
74,
4
] | [
91,
27
] | python | en | ['en', 'error', 'th'] | False |
Line.width | (self) |
Sets the line width (in px).
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 line width (in px).
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 line width (in px).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["width"] | [
"def",
"width",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"width\"",
"]"
] | [
100,
4
] | [
111,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.__init__ | (self, arg=None, color=None, dash=None, width=None, **kwargs) |
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.connector.Line`
color
Sets the line color.
dash
... |
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.connector.Line`
color
Sets the line color.
dash
... | def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs):
"""
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterf... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"dash",
"=",
"None",
",",
"width",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Line",
",",
"self",
")",
".",
"__init__",
"(",
"\"line\"",
... | [
133,
4
] | [
205,
34
] | python | en | ['en', 'error', 'th'] | False |
test_node_detected_upgrade_done | (nodeSet) |
Test that each node checks Upgrade Log on startup (after Upgrade restart), and writes SUCCESS to it
because the current version equals to the one in Upgrade log.
Upgrade log already created START event (see fixture above emulating real upgrade)
|
Test that each node checks Upgrade Log on startup (after Upgrade restart), and writes SUCCESS to it
because the current version equals to the one in Upgrade log.
Upgrade log already created START event (see fixture above emulating real upgrade)
| def test_node_detected_upgrade_done(nodeSet):
'''
Test that each node checks Upgrade Log on startup (after Upgrade restart), and writes SUCCESS to it
because the current version equals to the one in Upgrade log.
Upgrade log already created START event (see fixture above emulating real upgrade)
'''
... | [
"def",
"test_node_detected_upgrade_done",
"(",
"nodeSet",
")",
":",
"for",
"node",
"in",
"nodeSet",
":",
"assert",
"node",
".",
"upgrader",
".",
"scheduledAction",
"is",
"None",
"assert",
"node",
".",
"upgrader",
".",
"lastActionEventInfo",
".",
"ev_type",
"==",... | [
29,
0
] | [
37,
87
] | python | en | ['en', 'error', 'th'] | False |
test_node_sent_upgrade_successful | (looper, nodeSet, nodeIds) |
Test that each node sends NODE_UPGRADE Success event (because it sees SUCCESS in Upgrade log)
Upgrade log already created START event (see fixture above emulating real upgrade)
|
Test that each node sends NODE_UPGRADE Success event (because it sees SUCCESS in Upgrade log)
Upgrade log already created START event (see fixture above emulating real upgrade)
| def test_node_sent_upgrade_successful(looper, nodeSet, nodeIds):
'''
Test that each node sends NODE_UPGRADE Success event (because it sees SUCCESS in Upgrade log)
Upgrade log already created START event (see fixture above emulating real upgrade)
'''
check_node_sent_acknowledges_upgrade(looper, nodeS... | [
"def",
"test_node_sent_upgrade_successful",
"(",
"looper",
",",
"nodeSet",
",",
"nodeIds",
")",
":",
"check_node_sent_acknowledges_upgrade",
"(",
"looper",
",",
"nodeSet",
",",
"nodeIds",
",",
"allowed_actions",
"=",
"[",
"COMPLETE",
"]",
",",
"ledger_size",
"=",
... | [
40,
0
] | [
48,
66
] | python | en | ['en', 'error', 'th'] | False |
test_node_sent_upgrade_successful_once_view_change | (looper, nodeSet, nodeIds) |
Test that each node sends NODE_UPGRADE Success event only once after each view change
|
Test that each node sends NODE_UPGRADE Success event only once after each view change
| def test_node_sent_upgrade_successful_once_view_change(looper, nodeSet, nodeIds):
'''
Test that each node sends NODE_UPGRADE Success event only once after each view change
'''
# emulate view changes 1-4
emulate_view_change_pool_for_upgrade(nodeSet)
emulate_view_change_pool_for_upgrade(nodeSet)
... | [
"def",
"test_node_sent_upgrade_successful_once_view_change",
"(",
"looper",
",",
"nodeSet",
",",
"nodeIds",
")",
":",
"# emulate view changes 1-4",
"emulate_view_change_pool_for_upgrade",
"(",
"nodeSet",
")",
"emulate_view_change_pool_for_upgrade",
"(",
"nodeSet",
")",
"emulate... | [
51,
0
] | [
65,
73
] | python | en | ['en', 'error', 'th'] | False |
test_node_sent_upgrade_successful_once_restart | (looper, nodeSet, nodeIds) |
Test that each node sends NODE_UPGRADE Success event only once after restart,
so that if we restart the node it's not sent again
|
Test that each node sends NODE_UPGRADE Success event only once after restart,
so that if we restart the node it's not sent again
| def test_node_sent_upgrade_successful_once_restart(looper, nodeSet, nodeIds):
'''
Test that each node sends NODE_UPGRADE Success event only once after restart,
so that if we restart the node it's not sent again
'''
# emulate restart
emulate_restart_pool_for_upgrade(nodeSet)
# check that con... | [
"def",
"test_node_sent_upgrade_successful_once_restart",
"(",
"looper",
",",
"nodeSet",
",",
"nodeIds",
")",
":",
"# emulate restart",
"emulate_restart_pool_for_upgrade",
"(",
"nodeSet",
")",
"# check that config ledger didn't changed (no new txns were sent)",
"check_node_do_not_sent... | [
68,
0
] | [
80,
73
] | python | en | ['en', 'error', 'th'] | False |
search_object_by_tag | (key=None, category=None) |
Find object based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Returns:
matches (list): List of Objects with tags matc... |
Find object based on tag or category. | def search_object_by_tag(key=None, category=None):
"""
Find object based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Retur... | [
"def",
"search_object_by_tag",
"(",
"key",
"=",
"None",
",",
"category",
"=",
"None",
")",
":",
"return",
"ObjectDB",
".",
"objects",
".",
"get_by_tag",
"(",
"key",
"=",
"key",
",",
"category",
"=",
"category",
")"
] | [
229,
0
] | [
245,
66
] | python | en | ['en', 'error', 'th'] | False |
search_account_tag | (key=None, category=None) |
Find account based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Returns:
matches (list): List of Accounts with tags ma... |
Find account based on tag or category. | def search_account_tag(key=None, category=None):
"""
Find account based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Return... | [
"def",
"search_account_tag",
"(",
"key",
"=",
"None",
",",
"category",
"=",
"None",
")",
":",
"return",
"AccountDB",
".",
"objects",
".",
"get_by_tag",
"(",
"key",
"=",
"key",
",",
"category",
"=",
"category",
")"
] | [
251,
0
] | [
267,
67
] | python | en | ['en', 'error', 'th'] | False |
search_script_tag | (key=None, category=None) |
Find script based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Returns:
matches (list): List of Scripts with tags matc... |
Find script based on tag or category. | def search_script_tag(key=None, category=None):
"""
Find script based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Returns:... | [
"def",
"search_script_tag",
"(",
"key",
"=",
"None",
",",
"category",
"=",
"None",
")",
":",
"return",
"ScriptDB",
".",
"objects",
".",
"get_by_tag",
"(",
"key",
"=",
"key",
",",
"category",
"=",
"category",
")"
] | [
270,
0
] | [
286,
66
] | python | en | ['en', 'error', 'th'] | False |
search_channel_tag | (key=None, category=None) |
Find channel based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Returns:
matches (list): List of Channels with tags ma... |
Find channel based on tag or category. | def search_channel_tag(key=None, category=None):
"""
Find channel based on tag or category.
Args:
key (str, optional): The tag key to search for.
category (str, optional): The category of tag
to search for. If not set, uncategorized
tags will be searched.
Return... | [
"def",
"search_channel_tag",
"(",
"key",
"=",
"None",
",",
"category",
"=",
"None",
")",
":",
"return",
"Channel",
".",
"objects",
".",
"get_by_tag",
"(",
"key",
"=",
"key",
",",
"category",
"=",
"category",
")"
] | [
289,
0
] | [
305,
65
] | 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.heatmapgl.colorbar.Tickfont`
color... |
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 |
ConversionScript.run | (self) |
Run Conversion.
Print sample agent act after conversion.
|
Run Conversion. | def run(self):
"""
Run Conversion.
Print sample agent act after conversion.
"""
# 1. load state
self.state = self.load_fairseq_checkpoint()
# 2. get parlai options
opt = self.get_parlai_opt()
# 3. create agent and convert model weights
sel... | [
"def",
"run",
"(",
"self",
")",
":",
"# 1. load state",
"self",
".",
"state",
"=",
"self",
".",
"load_fairseq_checkpoint",
"(",
")",
"# 2. get parlai options",
"opt",
"=",
"self",
".",
"get_parlai_opt",
"(",
")",
"# 3. create agent and convert model weights",
"self"... | [
119,
4
] | [
136,
30
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript.get_parlai_opt | (self) |
Parser for converting fairseq argument to ParlAI opt.
:return opt:
opt parsed by ParlAI Parser
|
Parser for converting fairseq argument to ParlAI opt. | def get_parlai_opt(self) -> Opt:
"""
Parser for converting fairseq argument to ParlAI opt.
:return opt:
opt parsed by ParlAI Parser
"""
# assume encoder/decoder symetrical except for number of layers
state = self.state
fairseq_args = state['args'].__d... | [
"def",
"get_parlai_opt",
"(",
"self",
")",
"->",
"Opt",
":",
"# assume encoder/decoder symetrical except for number of layers",
"state",
"=",
"self",
".",
"state",
"fairseq_args",
"=",
"state",
"[",
"'args'",
"]",
".",
"__dict__",
"transformer_common_config",
"=",
"{"... | [
138,
4
] | [
215,
18
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript._validate_fairseq_args | (self, args: Dict[str, Any]) |
Validate that fairseq args are compatible with ParlAI.
|
Validate that fairseq args are compatible with ParlAI.
| def _validate_fairseq_args(self, args: Dict[str, Any]):
"""
Validate that fairseq args are compatible with ParlAI.
"""
norm_key = 'encoder_normalize_before'
assert (
args[norm_key] == args[norm_key]
), "This asymmetrical transformer is not supported yet!"
... | [
"def",
"_validate_fairseq_args",
"(",
"self",
",",
"args",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
")",
":",
"norm_key",
"=",
"'encoder_normalize_before'",
"assert",
"(",
"args",
"[",
"norm_key",
"]",
"==",
"args",
"[",
"norm_key",
"]",
")",
",",
"\"Th... | [
217,
4
] | [
232,
68
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript._load_single_fairseq_checkpoint | (self, path: str) |
Loads a fairseq model from file.
:param path:
path to file
:return state:
loaded fairseq state
|
Loads a fairseq model from file. | def _load_single_fairseq_checkpoint(self, path: str) -> Dict[str, Any]:
"""
Loads a fairseq model from file.
:param path:
path to file
:return state:
loaded fairseq state
"""
with PathManager.open(path, "rb") as f:
try:
... | [
"def",
"_load_single_fairseq_checkpoint",
"(",
"self",
",",
"path",
":",
"str",
")",
"->",
"Dict",
"[",
"str",
",",
"Any",
"]",
":",
"with",
"PathManager",
".",
"open",
"(",
"path",
",",
"\"rb\"",
")",
"as",
"f",
":",
"try",
":",
"state",
"=",
"torch... | [
234,
4
] | [
254,
20
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript.load_fairseq_checkpoint | (self) |
Load a checkpoint to CPU (with upgrading for backward compatibility).
:return state:
loaded fairseq state
|
Load a checkpoint to CPU (with upgrading for backward compatibility). | def load_fairseq_checkpoint(self):
"""
Load a checkpoint to CPU (with upgrading for backward compatibility).
:return state:
loaded fairseq state
"""
paths: List[str] = self.opt['input']
if len(paths) == 1:
# just a single checkpoint, no fancy merg... | [
"def",
"load_fairseq_checkpoint",
"(",
"self",
")",
":",
"paths",
":",
"List",
"[",
"str",
"]",
"=",
"self",
".",
"opt",
"[",
"'input'",
"]",
"if",
"len",
"(",
"paths",
")",
"==",
"1",
":",
"# just a single checkpoint, no fancy merges necessary",
"return",
"... | [
256,
4
] | [
305,
24
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript.convert_model_weight | (self, opt: Opt) |
Convert state_dict between fairseq and ParlAI.
:param opt:
ParlAI opt
:return state_dict:
return a state dict to load into ParlAI model.
|
Convert state_dict between fairseq and ParlAI. | def convert_model_weight(self, opt: Opt) -> Dict[str, Any]:
"""
Convert state_dict between fairseq and ParlAI.
:param opt:
ParlAI opt
:return state_dict:
return a state dict to load into ParlAI model.
"""
# deal with embeddings
state = se... | [
"def",
"convert_model_weight",
"(",
"self",
",",
"opt",
":",
"Opt",
")",
"->",
"Dict",
"[",
"str",
",",
"Any",
"]",
":",
"# deal with embeddings",
"state",
"=",
"self",
".",
"state",
"agent",
"=",
"self",
".",
"agent",
"state_dict",
"=",
"state",
"[",
... | [
307,
4
] | [
477,
26
] | python | en | ['en', 'error', 'th'] | False |
ConversionScript.print_agent_act | (self) |
Print a sample act from the converted agent.
|
Print a sample act from the converted agent.
| def print_agent_act(self):
"""
Print a sample act from the converted agent.
"""
self.agent.observe(
{'text': "What's your favorite kind of ramen?", 'episode_done': False}
)
print(self.agent.act()) | [
"def",
"print_agent_act",
"(",
"self",
")",
":",
"self",
".",
"agent",
".",
"observe",
"(",
"{",
"'text'",
":",
"\"What's your favorite kind of ramen?\"",
",",
"'episode_done'",
":",
"False",
"}",
")",
"print",
"(",
"self",
".",
"agent",
".",
"act",
"(",
"... | [
479,
4
] | [
486,
31
] | python | en | ['en', 'error', 'th'] | False |
WebsocketManager.__init__ | (self, opt) |
Create a WebsocketManager using the given setup options.
|
Create a WebsocketManager using the given setup options.
| def __init__(self, opt):
"""
Create a WebsocketManager using the given setup options.
"""
super().__init__(opt)
self.opt = opt
self.port = opt.get('port')
self.subs = {}
self.app = None
self.debug = opt.get('is_debug', False)
self.message... | [
"def",
"__init__",
"(",
"self",
",",
"opt",
")",
":",
"super",
"(",
")",
".",
"__init__",
"(",
"opt",
")",
"self",
".",
"opt",
"=",
"opt",
"self",
".",
"port",
"=",
"opt",
".",
"get",
"(",
"'port'",
")",
"self",
".",
"subs",
"=",
"{",
"}",
"s... | [
36,
4
] | [
53,
30
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.