body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
61bbeec629d6b4832ba74d1d9c5ab19681e922caa5ee8f054375322882fbe2e8 | def select(self, n, silently=False):
'\n Select a node :param n and deselect all other selected nodes\n\n :param silently: Flag set to true to prevent firing on change event and vice versa. Default is false\n :param n: Node to be selected\n '
for node in self._selected:
node.... | Select a node :param n and deselect all other selected nodes
:param silently: Flag set to true to prevent firing on change event and vice versa. Default is false
:param n: Node to be selected | hoverset/ui/widgets.py | select | ObaraEmmanuel/Formation | 71 | python | def select(self, n, silently=False):
'\n Select a node :param n and deselect all other selected nodes\n\n :param silently: Flag set to true to prevent firing on change event and vice versa. Default is false\n :param n: Node to be selected\n '
for node in self._selected:
node.... | def select(self, n, silently=False):
'\n Select a node :param n and deselect all other selected nodes\n\n :param silently: Flag set to true to prevent firing on change event and vice versa. Default is false\n :param n: Node to be selected\n '
for node in self._selected:
node.... |
fcff35e2a0b859f191b8096be1038563d191bb7b56a19af7d5f85f63fea3c47d | def clear_selection(self):
'\n Deselect all currently selected nodes\n '
for node in self._selected:
node.deselect()
self._selected = []
self.selection_changed() | Deselect all currently selected nodes | hoverset/ui/widgets.py | clear_selection | ObaraEmmanuel/Formation | 71 | python | def clear_selection(self):
'\n \n '
for node in self._selected:
node.deselect()
self._selected = []
self.selection_changed() | def clear_selection(self):
'\n \n '
for node in self._selected:
node.deselect()
self._selected = []
self.selection_changed()<|docstring|>Deselect all currently selected nodes<|endoftext|> |
98d33cea54b355ba097dc99c808f3a701d66dff3bc9c04aeb265cbbf3a93f935 | def get(self):
'\n Get the currently selected node if multi select is set to False and a list of all selected items if multi\n select is set to True. Returns None if no item is selected.\n\n :return: Selected widget or None if no widget is selected\n '
if self._multi_select:
... | Get the currently selected node if multi select is set to False and a list of all selected items if multi
select is set to True. Returns None if no item is selected.
:return: Selected widget or None if no widget is selected | hoverset/ui/widgets.py | get | ObaraEmmanuel/Formation | 71 | python | def get(self):
'\n Get the currently selected node if multi select is set to False and a list of all selected items if multi\n select is set to True. Returns None if no item is selected.\n\n :return: Selected widget or None if no widget is selected\n '
if self._multi_select:
... | def get(self):
'\n Get the currently selected node if multi select is set to False and a list of all selected items if multi\n select is set to True. Returns None if no item is selected.\n\n :return: Selected widget or None if no widget is selected\n '
if self._multi_select:
... |
1705b36dba9bcfd5395b7a71e15ad3af9f722f0a851d72a10f468296911a109c | def add(self, node):
'\n Add an already created node to the tree view. Use add_as_node instead to avoid tkinter parent\n issues.\n\n :param node: The child Node to be added to the Node\n '
self.nodes.append(node)
node.parent_node = self
node.depth = (self.depth + 1)
node.... | Add an already created node to the tree view. Use add_as_node instead to avoid tkinter parent
issues.
:param node: The child Node to be added to the Node | hoverset/ui/widgets.py | add | ObaraEmmanuel/Formation | 71 | python | def add(self, node):
'\n Add an already created node to the tree view. Use add_as_node instead to avoid tkinter parent\n issues.\n\n :param node: The child Node to be added to the Node\n '
self.nodes.append(node)
node.parent_node = self
node.depth = (self.depth + 1)
node.... | def add(self, node):
'\n Add an already created node to the tree view. Use add_as_node instead to avoid tkinter parent\n issues.\n\n :param node: The child Node to be added to the Node\n '
self.nodes.append(node)
node.parent_node = self
node.depth = (self.depth + 1)
node.... |
f82ba2c1df77c29ac932faaee3a69dd35aebb500d43eed7c6a9d318e0cb238ec | def add_as_node(self, **options) -> Node:
"\n Adds a base node to the Tree. The node will belong to a subclass' Node definition if any.\n\n :param options: Options used in creating the node like name, icon e.t.c.\n :return: The created Node\n "
node = self.__class__.Node(self, **opti... | Adds a base node to the Tree. The node will belong to a subclass' Node definition if any.
:param options: Options used in creating the node like name, icon e.t.c.
:return: The created Node | hoverset/ui/widgets.py | add_as_node | ObaraEmmanuel/Formation | 71 | python | def add_as_node(self, **options) -> Node:
"\n Adds a base node to the Tree. The node will belong to a subclass' Node definition if any.\n\n :param options: Options used in creating the node like name, icon e.t.c.\n :return: The created Node\n "
node = self.__class__.Node(self, **opti... | def add_as_node(self, **options) -> Node:
"\n Adds a base node to the Tree. The node will belong to a subclass' Node definition if any.\n\n :param options: Options used in creating the node like name, icon e.t.c.\n :return: The created Node\n "
node = self.__class__.Node(self, **opti... |
65ed280c74febdeee6716f7c9bfa93ee5337dc8c2f396795ec3edaf4efe50baf | def allow_multi_select(self, flag):
'\n Allow or disallow multiple widgets to be selected\n\n :param flag: Set to True to allow multiple items to be selected by the tree view and false to disable\n selection of multiple items.\n '
self._multi_select = flag | Allow or disallow multiple widgets to be selected
:param flag: Set to True to allow multiple items to be selected by the tree view and false to disable
selection of multiple items. | hoverset/ui/widgets.py | allow_multi_select | ObaraEmmanuel/Formation | 71 | python | def allow_multi_select(self, flag):
'\n Allow or disallow multiple widgets to be selected\n\n :param flag: Set to True to allow multiple items to be selected by the tree view and false to disable\n selection of multiple items.\n '
self._multi_select = flag | def allow_multi_select(self, flag):
'\n Allow or disallow multiple widgets to be selected\n\n :param flag: Set to True to allow multiple items to be selected by the tree view and false to disable\n selection of multiple items.\n '
self._multi_select = flag<|docstring|>Allow or disa... |
d08b15474e91e2fafc47284b5f808bdf2dcd10ccd5ef7ebd1dcbb80662404c29 | def collapse_all(self):
'\n Collapse all nodes and sub-nodes so that their sub-node are not displayed\n '
for node in self.nodes:
node.collapse_all() | Collapse all nodes and sub-nodes so that their sub-node are not displayed | hoverset/ui/widgets.py | collapse_all | ObaraEmmanuel/Formation | 71 | python | def collapse_all(self):
'\n \n '
for node in self.nodes:
node.collapse_all() | def collapse_all(self):
'\n \n '
for node in self.nodes:
node.collapse_all()<|docstring|>Collapse all nodes and sub-nodes so that their sub-node are not displayed<|endoftext|> |
d2a7120d412b1ea151b1927e515ebd5b985b348114241c62daaaac7e69e9219a | def expand_all(self):
'\n Expand all nodes and sub-nodes so that their sub-nodes are displayed\n '
for node in self.nodes:
node.expand_all() | Expand all nodes and sub-nodes so that their sub-nodes are displayed | hoverset/ui/widgets.py | expand_all | ObaraEmmanuel/Formation | 71 | python | def expand_all(self):
'\n \n '
for node in self.nodes:
node.expand_all() | def expand_all(self):
'\n \n '
for node in self.nodes:
node.expand_all()<|docstring|>Expand all nodes and sub-nodes so that their sub-nodes are displayed<|endoftext|> |
7589674af40197b450d7827db4b8c3fa30750e4dd9520072b6e7ec2a5c5a90fa | def selected_count(self) -> int:
'\n Return the total number of items currently selected usually 1 if multi-select is disabled.\n\n :return: total number of items selected\n '
return len(self._selected) | Return the total number of items currently selected usually 1 if multi-select is disabled.
:return: total number of items selected | hoverset/ui/widgets.py | selected_count | ObaraEmmanuel/Formation | 71 | python | def selected_count(self) -> int:
'\n Return the total number of items currently selected usually 1 if multi-select is disabled.\n\n :return: total number of items selected\n '
return len(self._selected) | def selected_count(self) -> int:
'\n Return the total number of items currently selected usually 1 if multi-select is disabled.\n\n :return: total number of items selected\n '
return len(self._selected)<|docstring|>Return the total number of items currently selected usually 1 if multi-selec... |
86ec3266d973ea0c1f85531bb7d943f4fdf39dad1ffcebd2444e3be466892748 | def mode(self, value):
'\n Set the mode of the progressbar to determinate or indeterminate\n\n :param value: constant value either ProgressBar.DETERMINATE or ProgressBar.INDETERMINATE\n '
self._indeterminate = (value == ProgressBar.INDETERMINATE)
self._draw() | Set the mode of the progressbar to determinate or indeterminate
:param value: constant value either ProgressBar.DETERMINATE or ProgressBar.INDETERMINATE | hoverset/ui/widgets.py | mode | ObaraEmmanuel/Formation | 71 | python | def mode(self, value):
'\n Set the mode of the progressbar to determinate or indeterminate\n\n :param value: constant value either ProgressBar.DETERMINATE or ProgressBar.INDETERMINATE\n '
self._indeterminate = (value == ProgressBar.INDETERMINATE)
self._draw() | def mode(self, value):
'\n Set the mode of the progressbar to determinate or indeterminate\n\n :param value: constant value either ProgressBar.DETERMINATE or ProgressBar.INDETERMINATE\n '
self._indeterminate = (value == ProgressBar.INDETERMINATE)
self._draw()<|docstring|>Set the mode of... |
beef0b687848c39a05468440146fa2201f3ed4834042ee618e974d35baef837c | def interval(self, milliseconds):
'\n Controls the speed of the indeterminate mode of the progressbar\n\n :param milliseconds: the update time in milliseconds, the smaller the faster\n '
self._interval = milliseconds | Controls the speed of the indeterminate mode of the progressbar
:param milliseconds: the update time in milliseconds, the smaller the faster | hoverset/ui/widgets.py | interval | ObaraEmmanuel/Formation | 71 | python | def interval(self, milliseconds):
'\n Controls the speed of the indeterminate mode of the progressbar\n\n :param milliseconds: the update time in milliseconds, the smaller the faster\n '
self._interval = milliseconds | def interval(self, milliseconds):
'\n Controls the speed of the indeterminate mode of the progressbar\n\n :param milliseconds: the update time in milliseconds, the smaller the faster\n '
self._interval = milliseconds<|docstring|>Controls the speed of the indeterminate mode of the progressba... |
196c3520887c92558db2294f8ef94740fedb42a80586219a653ebe4088ca5bc5 | def set(self, value: float):
'\n Sets the progress to a fraction value\n\n :param value: A floating point value between 0 and 1 inclusive which determines the progress\n '
self._progress = value
self._draw() | Sets the progress to a fraction value
:param value: A floating point value between 0 and 1 inclusive which determines the progress | hoverset/ui/widgets.py | set | ObaraEmmanuel/Formation | 71 | python | def set(self, value: float):
'\n Sets the progress to a fraction value\n\n :param value: A floating point value between 0 and 1 inclusive which determines the progress\n '
self._progress = value
self._draw() | def set(self, value: float):
'\n Sets the progress to a fraction value\n\n :param value: A floating point value between 0 and 1 inclusive which determines the progress\n '
self._progress = value
self._draw()<|docstring|>Sets the progress to a fraction value
:param value: A floating poi... |
6083a85e4fb85a285bfe791aaba0faa724bd8cb33d23eded8ee1027cc6c7864e | def get(self):
'\n Fetch the current progress of the bar.\n\n :return: a floating point from 0 to 1 representing current progress. If mode is set to\n indeterminate None is returned\n '
if self._indeterminate:
return None
return self._progress | Fetch the current progress of the bar.
:return: a floating point from 0 to 1 representing current progress. If mode is set to
indeterminate None is returned | hoverset/ui/widgets.py | get | ObaraEmmanuel/Formation | 71 | python | def get(self):
'\n Fetch the current progress of the bar.\n\n :return: a floating point from 0 to 1 representing current progress. If mode is set to\n indeterminate None is returned\n '
if self._indeterminate:
return None
return self._progress | def get(self):
'\n Fetch the current progress of the bar.\n\n :return: a floating point from 0 to 1 representing current progress. If mode is set to\n indeterminate None is returned\n '
if self._indeterminate:
return None
return self._progress<|docstring|>Fetch the curr... |
fd57d04120a68f558f5eddd9eaadfab216e2b9ad5fc958d800dd4a297b797622 | def color(self, color):
'\n Set the progress bar color\n\n :param color: A named color or hex defined color\n :raises: :class:`ValueError` if color is not a valid tk color\n '
prev_color = self._bar_color
self._bar_color = color
try:
self._draw()
except tk.TclErro... | Set the progress bar color
:param color: A named color or hex defined color
:raises: :class:`ValueError` if color is not a valid tk color | hoverset/ui/widgets.py | color | ObaraEmmanuel/Formation | 71 | python | def color(self, color):
'\n Set the progress bar color\n\n :param color: A named color or hex defined color\n :raises: :class:`ValueError` if color is not a valid tk color\n '
prev_color = self._bar_color
self._bar_color = color
try:
self._draw()
except tk.TclErro... | def color(self, color):
'\n Set the progress bar color\n\n :param color: A named color or hex defined color\n :raises: :class:`ValueError` if color is not a valid tk color\n '
prev_color = self._bar_color
self._bar_color = color
try:
self._draw()
except tk.TclErro... |
f18bea64e599a9f6a76e355df956190e5f1b598b756555c1914c05fdeabbd00d | def render(self):
'\n Create the custom section of a custom item. Override this\n method and add new widgets to the item. The default rendering\n is a label containing the value of the item\n '
self._text = Label(self, **self.style.text, text=self._value, anchor='w')
... | Create the custom section of a custom item. Override this
method and add new widgets to the item. The default rendering
is a label containing the value of the item | hoverset/ui/widgets.py | render | ObaraEmmanuel/Formation | 71 | python | def render(self):
'\n Create the custom section of a custom item. Override this\n method and add new widgets to the item. The default rendering\n is a label containing the value of the item\n '
self._text = Label(self, **self.style.text, text=self._value, anchor='w')
... | def render(self):
'\n Create the custom section of a custom item. Override this\n method and add new widgets to the item. The default rendering\n is a label containing the value of the item\n '
self._text = Label(self, **self.style.text, text=self._value, anchor='w')
... |
e5dcc91e6364bcf61b0f821a949d26393da56e723040f1a07834337aab00e94e | @property
def value(self):
'\n The value the item is supposed to display. Can be any object\n depending on what is set through :py:attr:`CompoundList.set_values`\n\n :return: Value represented by item\n '
return self._value | The value the item is supposed to display. Can be any object
depending on what is set through :py:attr:`CompoundList.set_values`
:return: Value represented by item | hoverset/ui/widgets.py | value | ObaraEmmanuel/Formation | 71 | python | @property
def value(self):
'\n The value the item is supposed to display. Can be any object\n depending on what is set through :py:attr:`CompoundList.set_values`\n\n :return: Value represented by item\n '
return self._value | @property
def value(self):
'\n The value the item is supposed to display. Can be any object\n depending on what is set through :py:attr:`CompoundList.set_values`\n\n :return: Value represented by item\n '
return self._value<|docstring|>The value the item is supposed t... |
52d2e90b45a52f697226f91d1ab24cec3a39441464a8a29d3a84f8f24e493d9d | def select_self(self, event=None, *_):
'\n Set the item as selected in its parent list\n\n :param event: event causing the selection. Default is ``None``\n '
self._parent.select(self._index, event) | Set the item as selected in its parent list
:param event: event causing the selection. Default is ``None`` | hoverset/ui/widgets.py | select_self | ObaraEmmanuel/Formation | 71 | python | def select_self(self, event=None, *_):
'\n Set the item as selected in its parent list\n\n :param event: event causing the selection. Default is ``None``\n '
self._parent.select(self._index, event) | def select_self(self, event=None, *_):
'\n Set the item as selected in its parent list\n\n :param event: event causing the selection. Default is ``None``\n '
self._parent.select(self._index, event)<|docstring|>Set the item as selected in its parent list
:param event: event caus... |
5989a2bab815a84d614f00765bae6ca4a4d8e0b11376731a34ec909824dc89cc | def select(self, *_):
'\n Marks item as selected and applies the required styles and\n configuration to make it appear selected such as the color\n '
self._selected = True
self.on_hover() | Marks item as selected and applies the required styles and
configuration to make it appear selected such as the color | hoverset/ui/widgets.py | select | ObaraEmmanuel/Formation | 71 | python | def select(self, *_):
'\n Marks item as selected and applies the required styles and\n configuration to make it appear selected such as the color\n '
self._selected = True
self.on_hover() | def select(self, *_):
'\n Marks item as selected and applies the required styles and\n configuration to make it appear selected such as the color\n '
self._selected = True
self.on_hover()<|docstring|>Marks item as selected and applies the required styles and
configuration to... |
a6aa1e0cca6384216f6dcbacca58dd9e66d064b8fe3754ab911010f7d14d8552 | def deselect(self):
'\n Marks item as deselected and applies the required styles and\n configuration to make it return to its normal state\n '
self._selected = False
self.on_hover_ended() | Marks item as deselected and applies the required styles and
configuration to make it return to its normal state | hoverset/ui/widgets.py | deselect | ObaraEmmanuel/Formation | 71 | python | def deselect(self):
'\n Marks item as deselected and applies the required styles and\n configuration to make it return to its normal state\n '
self._selected = False
self.on_hover_ended() | def deselect(self):
'\n Marks item as deselected and applies the required styles and\n configuration to make it return to its normal state\n '
self._selected = False
self.on_hover_ended()<|docstring|>Marks item as deselected and applies the required styles and
configuration ... |
ede86479329409f37a5dc2bf0ffcd8ee90e328e0a9a01c77f88d1212e6f2f196 | def on_hover(self, *_):
'\n Applies styles and config required when item is hovered\n '
self.config_all(**self.style.hover) | Applies styles and config required when item is hovered | hoverset/ui/widgets.py | on_hover | ObaraEmmanuel/Formation | 71 | python | def on_hover(self, *_):
'\n \n '
self.config_all(**self.style.hover) | def on_hover(self, *_):
'\n \n '
self.config_all(**self.style.hover)<|docstring|>Applies styles and config required when item is hovered<|endoftext|> |
fd451904fa83687aa7207c1488c2972b790a74d74acdb79f65cace613965c884 | def on_hover_ended(self, *_):
'\n Revert the item config when no longer under hover\n '
self.config_all(**self.style.surface) | Revert the item config when no longer under hover | hoverset/ui/widgets.py | on_hover_ended | ObaraEmmanuel/Formation | 71 | python | def on_hover_ended(self, *_):
'\n \n '
self.config_all(**self.style.surface) | def on_hover_ended(self, *_):
'\n \n '
self.config_all(**self.style.surface)<|docstring|>Revert the item config when no longer under hover<|endoftext|> |
f422043caec9ebdd4d61141a5b139b58e38e114f73a5e49f737cf3e488de0e29 | def get(self):
'\n Get the value represented by the item\n\n :return: Value represented by the item\n '
return self._value | Get the value represented by the item
:return: Value represented by the item | hoverset/ui/widgets.py | get | ObaraEmmanuel/Formation | 71 | python | def get(self):
'\n Get the value represented by the item\n\n :return: Value represented by the item\n '
return self._value | def get(self):
'\n Get the value represented by the item\n\n :return: Value represented by the item\n '
return self._value<|docstring|>Get the value represented by the item
:return: Value represented by the item<|endoftext|> |
1a43619205d44604cca80b2c2ce3b2c1357f0945fbceda41bcd587a72b947485 | def clone_to(self, parent):
'\n Create a copy of the item for positioning in a new parent\n\n :param parent: New intended parent\n :return: the new item clone\n '
return self.__class__(parent, self._value, self._index, True) | Create a copy of the item for positioning in a new parent
:param parent: New intended parent
:return: the new item clone | hoverset/ui/widgets.py | clone_to | ObaraEmmanuel/Formation | 71 | python | def clone_to(self, parent):
'\n Create a copy of the item for positioning in a new parent\n\n :param parent: New intended parent\n :return: the new item clone\n '
return self.__class__(parent, self._value, self._index, True) | def clone_to(self, parent):
'\n Create a copy of the item for positioning in a new parent\n\n :param parent: New intended parent\n :return: the new item clone\n '
return self.__class__(parent, self._value, self._index, True)<|docstring|>Create a copy of the item for p... |
51226901581f01d689cf37f2629a2441e6c7e588ee7628ee399a9beea034092b | def insert_after(self, *nodes):
'\n Insert the nodes immediately after this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert((self.parent_node.nodes.index(self) + 1), *nodes) | Insert the nodes immediately after this node in the same parent
:param nodes: List of nodes to be inserted | hoverset/ui/widgets.py | insert_after | ObaraEmmanuel/Formation | 71 | python | def insert_after(self, *nodes):
'\n Insert the nodes immediately after this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert((self.parent_node.nodes.index(self) + 1), *nodes) | def insert_after(self, *nodes):
'\n Insert the nodes immediately after this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert((self.parent_node.nodes.index(self) + 1), *nodes)<|docstring|>Insert the nodes immediately after this no... |
68e97941317ceb17e7e09e159a01f7c42315c8de7e10a021edbf28fc4b2dd4e7 | def insert_before(self, *nodes):
'\n Insert the nodes immediately before this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert(self.index(), *nodes) | Insert the nodes immediately before this node in the same parent
:param nodes: List of nodes to be inserted | hoverset/ui/widgets.py | insert_before | ObaraEmmanuel/Formation | 71 | python | def insert_before(self, *nodes):
'\n Insert the nodes immediately before this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert(self.index(), *nodes) | def insert_before(self, *nodes):
'\n Insert the nodes immediately before this node in the same parent\n\n :param nodes: List of nodes to be inserted\n '
self.parent_node.insert(self.index(), *nodes)<|docstring|>Insert the nodes immediately before this node in the same parent
:p... |
78ec85a32eba44de44efcc47182fda7f380cb5d738447fa363fc37bab42365a8 | def insert(self, index=None, *nodes):
'\n Insert all child nodes passed into parent node starting from the given index\n\n :param index: int representing the index from which to insert\n :param nodes: Child nodes to be inserted\n '
index = (len(self.nodes) if (index i... | Insert all child nodes passed into parent node starting from the given index
:param index: int representing the index from which to insert
:param nodes: Child nodes to be inserted | hoverset/ui/widgets.py | insert | ObaraEmmanuel/Formation | 71 | python | def insert(self, index=None, *nodes):
'\n Insert all child nodes passed into parent node starting from the given index\n\n :param index: int representing the index from which to insert\n :param nodes: Child nodes to be inserted\n '
index = (len(self.nodes) if (index i... | def insert(self, index=None, *nodes):
'\n Insert all child nodes passed into parent node starting from the given index\n\n :param index: int representing the index from which to insert\n :param nodes: Child nodes to be inserted\n '
index = (len(self.nodes) if (index i... |
a09b4e1ae4d7fcb5c8a3e160d1107923a6cecfdb6e9a817fab4709e5e08a77da | def add_as_node(self, **options):
'\n Adds a node to the tree view.\n\n :param options: Options used in creating the node like name, icon e.t.c. depending on the Node\n :return: The created Node\n '
node = self.__class__(self.tree, **options)
node.parent_node = se... | Adds a node to the tree view.
:param options: Options used in creating the node like name, icon e.t.c. depending on the Node
:return: The created Node | hoverset/ui/widgets.py | add_as_node | ObaraEmmanuel/Formation | 71 | python | def add_as_node(self, **options):
'\n Adds a node to the tree view.\n\n :param options: Options used in creating the node like name, icon e.t.c. depending on the Node\n :return: The created Node\n '
node = self.__class__(self.tree, **options)
node.parent_node = se... | def add_as_node(self, **options):
'\n Adds a node to the tree view.\n\n :param options: Options used in creating the node like name, icon e.t.c. depending on the Node\n :return: The created Node\n '
node = self.__class__(self.tree, **options)
node.parent_node = se... |
3a51726cd2838e8d474c1f49da5adcde55d0fea1c106dcd2424495b324b48ad1 | def remove(self, node=None):
"\n Remove the node from node's child nodes. If node is not provided the the node removes itself from\n its parent\n\n :param node: Node to be removed (optional)\n :return: None\n "
if (node is None):
self.parent_node.re... | Remove the node from node's child nodes. If node is not provided the the node removes itself from
its parent
:param node: Node to be removed (optional)
:return: None | hoverset/ui/widgets.py | remove | ObaraEmmanuel/Formation | 71 | python | def remove(self, node=None):
"\n Remove the node from node's child nodes. If node is not provided the the node removes itself from\n its parent\n\n :param node: Node to be removed (optional)\n :return: None\n "
if (node is None):
self.parent_node.re... | def remove(self, node=None):
"\n Remove the node from node's child nodes. If node is not provided the the node removes itself from\n its parent\n\n :param node: Node to be removed (optional)\n :return: None\n "
if (node is None):
self.parent_node.re... |
d1b384244c439c82a2c4a031cb5695da926b35fe9fdce7d1b5c75fbf54f6a83a | def toggle(self, *_):
'\n Toggle between the expanded and collapsed state\n '
if self._expanded:
self.collapse()
else:
self.expand() | Toggle between the expanded and collapsed state | hoverset/ui/widgets.py | toggle | ObaraEmmanuel/Formation | 71 | python | def toggle(self, *_):
'\n \n '
if self._expanded:
self.collapse()
else:
self.expand() | def toggle(self, *_):
'\n \n '
if self._expanded:
self.collapse()
else:
self.expand()<|docstring|>Toggle between the expanded and collapsed state<|endoftext|> |
3ae510b38275d8cd89883726f003df42f79b6c27fa48d4d10073205c85f81bbd | def FinFun(ticker, Fin, Term):
'Please create the folder structure C:/Data-Stockrow/Income Statement in your local machine'
if (Fin == Financials.Balanced_Sheet):
if (Term == Terms.Annual):
URL = (('https://stockrow.com/api/companies/' + ticker) + '/financials.xlsx?dimension=A§ion=Income... | Please create the folder structure C:/Data-Stockrow/Income Statement in your local machine | AlgorithmicTradingAndQuantitativeAnalysis/Examples/16_stockrow.py | FinFun | enriqueescobar-askida/Kinito.Finance | 2 | python | def FinFun(ticker, Fin, Term):
if (Fin == Financials.Balanced_Sheet):
if (Term == Terms.Annual):
URL = (('https://stockrow.com/api/companies/' + ticker) + '/financials.xlsx?dimension=A§ion=Income%20Statement&sort=desc')
filename = 'C:\\Data-Stockrow\\Income Statements\\Annua... | def FinFun(ticker, Fin, Term):
if (Fin == Financials.Balanced_Sheet):
if (Term == Terms.Annual):
URL = (('https://stockrow.com/api/companies/' + ticker) + '/financials.xlsx?dimension=A§ion=Income%20Statement&sort=desc')
filename = 'C:\\Data-Stockrow\\Income Statements\\Annua... |
40fa019869c0208f496ebaf66b8e99a67c13d9fd4bff2b7c6c6508d314f8ca9a | def process_results(mentions_dataset, predictions, processed, include_offset=False):
'\n Function that can be used to process the End-to-End results.\n\n :return: dictionary with results and document as key.\n '
res = {}
for doc in mentions_dataset:
if (doc not in predictions):
... | Function that can be used to process the End-to-End results.
:return: dictionary with results and document as key. | scripts/comparison_BLINK/run_server.py | process_results | Explorerhpx/REL | 210 | python | def process_results(mentions_dataset, predictions, processed, include_offset=False):
'\n Function that can be used to process the End-to-End results.\n\n :return: dictionary with results and document as key.\n '
res = {}
for doc in mentions_dataset:
if (doc not in predictions):
... | def process_results(mentions_dataset, predictions, processed, include_offset=False):
'\n Function that can be used to process the End-to-End results.\n\n :return: dictionary with results and document as key.\n '
res = {}
for doc in mentions_dataset:
if (doc not in predictions):
... |
fde9693a59b74316cd8b9e85130585e164d3e395eb9ce01b0a16a0183f7b9508 | def _get_ctxt(self, start, end, idx_sent, sentence):
'\n Retrieves context surrounding a given mention up to 100 words from both sides.\n\n :return: left and right context\n '
left_ctxt = split_in_words(sentence[:start])
left_ctxt = ' '.join(left_ctxt)
right_ctxt = split_in_words(sentence[end:]... | Retrieves context surrounding a given mention up to 100 words from both sides.
:return: left and right context | scripts/comparison_BLINK/run_server.py | _get_ctxt | Explorerhpx/REL | 210 | python | def _get_ctxt(self, start, end, idx_sent, sentence):
'\n Retrieves context surrounding a given mention up to 100 words from both sides.\n\n :return: left and right context\n '
left_ctxt = split_in_words(sentence[:start])
left_ctxt = ' '.join(left_ctxt)
right_ctxt = split_in_words(sentence[end:]... | def _get_ctxt(self, start, end, idx_sent, sentence):
'\n Retrieves context surrounding a given mention up to 100 words from both sides.\n\n :return: left and right context\n '
left_ctxt = split_in_words(sentence[:start])
left_ctxt = ' '.join(left_ctxt)
right_ctxt = split_in_words(sentence[end:]... |
02dceb3c833f18f5ad3094976d80fdd2444a239160ea615b350816c790089c8e | def do_POST(self):
'\n Returns response.\n\n :return:\n '
content_length = int(self.headers['Content-Length'])
print(content_length)
post_data = self.rfile.read(content_length)
self.send_response(200)
self.end_headers()
(text, spans) = self.read_json(post_dat... | Returns response.
:return: | scripts/comparison_BLINK/run_server.py | do_POST | Explorerhpx/REL | 210 | python | def do_POST(self):
'\n Returns response.\n\n :return:\n '
content_length = int(self.headers['Content-Length'])
print(content_length)
post_data = self.rfile.read(content_length)
self.send_response(200)
self.end_headers()
(text, spans) = self.read_json(post_dat... | def do_POST(self):
'\n Returns response.\n\n :return:\n '
content_length = int(self.headers['Content-Length'])
print(content_length)
post_data = self.rfile.read(content_length)
self.send_response(200)
self.end_headers()
(text, spans) = self.read_json(post_dat... |
796b39e5274d1ad2f50457c96948d4801591be12bfbb666f6a0ac7f68d1f13d8 | def read_json(self, post_data):
'\n Reads input JSON message.\n\n :return: document text and spans.\n '
data = json.loads(post_data.decode('utf-8'))
text = data['text']
text = text.replace('&', '&')
try:
spans = [list(d.values()) for d in data['spans']]
... | Reads input JSON message.
:return: document text and spans. | scripts/comparison_BLINK/run_server.py | read_json | Explorerhpx/REL | 210 | python | def read_json(self, post_data):
'\n Reads input JSON message.\n\n :return: document text and spans.\n '
data = json.loads(post_data.decode('utf-8'))
text = data['text']
text = text.replace('&', '&')
try:
spans = [list(d.values()) for d in data['spans']]
... | def read_json(self, post_data):
'\n Reads input JSON message.\n\n :return: document text and spans.\n '
data = json.loads(post_data.decode('utf-8'))
text = data['text']
text = text.replace('&', '&')
try:
spans = [list(d.values()) for d in data['spans']]
... |
8e57be582d0a4e6bc169d610c986aa34be05ba6cbb4cfc87d408698b867a4914 | def generate_response(self, text, spans):
'\n Generates response for API. Can be either ED only or EL, meaning end-to-end.\n\n :return: list of tuples for each entity found.\n '
if (len(text) == 0):
return []
if (len(spans) > 0):
processed = {API_DOC: [text, ... | Generates response for API. Can be either ED only or EL, meaning end-to-end.
:return: list of tuples for each entity found. | scripts/comparison_BLINK/run_server.py | generate_response | Explorerhpx/REL | 210 | python | def generate_response(self, text, spans):
'\n Generates response for API. Can be either ED only or EL, meaning end-to-end.\n\n :return: list of tuples for each entity found.\n '
if (len(text) == 0):
return []
if (len(spans) > 0):
processed = {API_DOC: [text, ... | def generate_response(self, text, spans):
'\n Generates response for API. Can be either ED only or EL, meaning end-to-end.\n\n :return: list of tuples for each entity found.\n '
if (len(text) == 0):
return []
if (len(spans) > 0):
processed = {API_DOC: [text, ... |
efa271be6d0fc62777cc8c3d03cbbba32eba5e4ddbbde6d6c58d1140b3cff5b0 | @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(oslist=['windows'], bugnumber='llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows')
def test_watch_iter(self):
'Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpo... | Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints. | SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py | test_watch_iter | Polidea/SiriusObfuscator | 427 | python | @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(oslist=['windows'], bugnumber='llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows')
def test_watch_iter(self):
self.build()
exe = os.path.join(os.getcwd(), 'a.out')
target = ... | @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(oslist=['windows'], bugnumber='llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows')
def test_watch_iter(self):
self.build()
exe = os.path.join(os.getcwd(), 'a.out')
target = ... |
268436404da21f057eeae296f2edf27a26577a8a6b78bfae392a3e18298d9863 | def write_pkl(data, name):
" name: '~.pkl' "
fp = open(name, 'wb')
pickle.dump(data, fp)
fp.close() | name: '~.pkl' | custom_systemdict.py | write_pkl | MJ-Jang/Marbas | 0 | python | def write_pkl(data, name):
" "
fp = open(name, 'wb')
pickle.dump(data, fp)
fp.close() | def write_pkl(data, name):
" "
fp = open(name, 'wb')
pickle.dump(data, fp)
fp.close()<|docstring|>name: '~.pkl'<|endoftext|> |
5532adb5a192efc23e0d4aaee6749348193cb2dd7f4a24069cd012b9288e95d9 | def read_pkl(name):
" name: '~.pkl' "
fp = open(name, 'rb')
return pickle.load(fp) | name: '~.pkl' | custom_systemdict.py | read_pkl | MJ-Jang/Marbas | 0 | python | def read_pkl(name):
" "
fp = open(name, 'rb')
return pickle.load(fp) | def read_pkl(name):
" "
fp = open(name, 'rb')
return pickle.load(fp)<|docstring|>name: '~.pkl'<|endoftext|> |
04d905483c6ed3e0bf44ac017380bcf4cbd3a2e014972744ea50bb366b0f6e67 | def _get_data(mp, table=None):
'\n Task to avoid serialization of lambdas\n '
return mp.data | Task to avoid serialization of lambdas | kartothek/io/dask/_utils.py | _get_data | janjagusch/kartothek | 2 | python | def _get_data(mp, table=None):
'\n \n '
return mp.data | def _get_data(mp, table=None):
'\n \n '
return mp.data<|docstring|>Task to avoid serialization of lambdas<|endoftext|> |
5795abfd45484b358a5421e533baa5c70234308cb1a244a2ca5fd3e2efab6c3c | def _maybe_get_categoricals_from_index(dataset_metadata_factory, categoricals):
'\n In case a categorical is requested for a column we have an index on,\n construct the categorical from the index\n '
categoricals_from_index = {}
if categoricals:
for column in categoricals:
if (c... | In case a categorical is requested for a column we have an index on,
construct the categorical from the index | kartothek/io/dask/_utils.py | _maybe_get_categoricals_from_index | janjagusch/kartothek | 2 | python | def _maybe_get_categoricals_from_index(dataset_metadata_factory, categoricals):
'\n In case a categorical is requested for a column we have an index on,\n construct the categorical from the index\n '
categoricals_from_index = {}
if categoricals:
for column in categoricals:
if (c... | def _maybe_get_categoricals_from_index(dataset_metadata_factory, categoricals):
'\n In case a categorical is requested for a column we have an index on,\n construct the categorical from the index\n '
categoricals_from_index = {}
if categoricals:
for column in categoricals:
if (c... |
d9f165fabc4f2f65421305a0d13be3e75fb82a4cd0dc746a043e485c9c9537d4 | def set_env(env: gym.Env, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Tuple[(gym.Env, int)]:
"Set environment according to user's config."
if (max_episode_steps > 0):
env._max_episode_steps = max_episode_steps
else:
max_episode_steps = env._max_episode_steps
if (not ... | Set environment according to user's config. | rl_algorithms/common/env/utils.py | set_env | krishanrana/rl_algorithms | 466 | python | def set_env(env: gym.Env, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Tuple[(gym.Env, int)]:
if (max_episode_steps > 0):
env._max_episode_steps = max_episode_steps
else:
max_episode_steps = env._max_episode_steps
if (not isinstance(env.action_space, Discrete)):
... | def set_env(env: gym.Env, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Tuple[(gym.Env, int)]:
if (max_episode_steps > 0):
env._max_episode_steps = max_episode_steps
else:
max_episode_steps = env._max_episode_steps
if (not isinstance(env.action_space, Discrete)):
... |
833976e39000b132688bea04f16fdc4e9a23c75b5ca4773538caf7a177e6b948 | def env_generator(env_name: str, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Callable:
'Return env creating function (with normalizers).'
def _thunk(rank: int):
env = gym.make(env_name)
env.seed(((777 + rank) + 1))
(env, _) = set_env(env, max_episode_steps, env_wrap... | Return env creating function (with normalizers). | rl_algorithms/common/env/utils.py | env_generator | krishanrana/rl_algorithms | 466 | python | def env_generator(env_name: str, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Callable:
def _thunk(rank: int):
env = gym.make(env_name)
env.seed(((777 + rank) + 1))
(env, _) = set_env(env, max_episode_steps, env_wrappers)
return env
return _thunk | def env_generator(env_name: str, max_episode_steps: int, env_wrappers: List[gym.Wrapper]=None) -> Callable:
def _thunk(rank: int):
env = gym.make(env_name)
env.seed(((777 + rank) + 1))
(env, _) = set_env(env, max_episode_steps, env_wrappers)
return env
return _thunk<|docstr... |
c25349cb09b68b11d8ff67a4968c381ea29b28d18c3724d501441fd3b753f9bf | def make_envs(env_gen: Callable, n_envs: int=8) -> SubprocVecEnv:
'Make multiple environments running on multiprocssors.'
envs = [env_gen(i) for i in range(n_envs)]
subproc_env = SubprocVecEnv(envs)
return subproc_env | Make multiple environments running on multiprocssors. | rl_algorithms/common/env/utils.py | make_envs | krishanrana/rl_algorithms | 466 | python | def make_envs(env_gen: Callable, n_envs: int=8) -> SubprocVecEnv:
envs = [env_gen(i) for i in range(n_envs)]
subproc_env = SubprocVecEnv(envs)
return subproc_env | def make_envs(env_gen: Callable, n_envs: int=8) -> SubprocVecEnv:
envs = [env_gen(i) for i in range(n_envs)]
subproc_env = SubprocVecEnv(envs)
return subproc_env<|docstring|>Make multiple environments running on multiprocssors.<|endoftext|> |
e8114df4b295617bf8622f675342b3ae96c5e8c60626b0666c5ace066c1ac9ec | def tokenize(self, text):
'this function is to tokenize the headline into a list of individual words'
lda_tokens = []
tokens = self.parser(text)
for token in tokens:
if token.orth_.isspace():
continue
elif token.like_url:
lda_tokens.append('URL')
elif toke... | this function is to tokenize the headline into a list of individual words | src/models/lda.py | tokenize | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def tokenize(self, text):
lda_tokens = []
tokens = self.parser(text)
for token in tokens:
if token.orth_.isspace():
continue
elif token.like_url:
lda_tokens.append('URL')
elif token.orth_.startswith('@'):
lda_tokens.append('SCREEN_NAME')
... | def tokenize(self, text):
lda_tokens = []
tokens = self.parser(text)
for token in tokens:
if token.orth_.isspace():
continue
elif token.like_url:
lda_tokens.append('URL')
elif token.orth_.startswith('@'):
lda_tokens.append('SCREEN_NAME')
... |
d929a5da802ce1d5df04a3e21efa499afe043300e20914779ac6aa1816e6703c | def get_lemma(self, word):
'this function is to lemmatize the words in a headline into its root form'
lemma = wn.morphy(word)
if (lemma is None):
return word
else:
return lemma | this function is to lemmatize the words in a headline into its root form | src/models/lda.py | get_lemma | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def get_lemma(self, word):
lemma = wn.morphy(word)
if (lemma is None):
return word
else:
return lemma | def get_lemma(self, word):
lemma = wn.morphy(word)
if (lemma is None):
return word
else:
return lemma<|docstring|>this function is to lemmatize the words in a headline into its root form<|endoftext|> |
53b7023697b8914e28f74c7ac7e2caf958c4c4172bfad0bde82ac659df223afb | def prepare_text_for_lda(self, text):
'To tokenize, remove headlines with only a few words (<4 words), lemmatize words in headlines'
tokens = self.tokenize(text)
tokens = [token for token in tokens if (len(token) > 4)]
tokens = [token for token in tokens if (token not in self.en_stop)]
tokens = [sel... | To tokenize, remove headlines with only a few words (<4 words), lemmatize words in headlines | src/models/lda.py | prepare_text_for_lda | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def prepare_text_for_lda(self, text):
tokens = self.tokenize(text)
tokens = [token for token in tokens if (len(token) > 4)]
tokens = [token for token in tokens if (token not in self.en_stop)]
tokens = [self.get_lemma(token) for token in tokens]
return tokens | def prepare_text_for_lda(self, text):
tokens = self.tokenize(text)
tokens = [token for token in tokens if (len(token) > 4)]
tokens = [token for token in tokens if (token not in self.en_stop)]
tokens = [self.get_lemma(token) for token in tokens]
return tokens<|docstring|>To tokenize, remove head... |
f5485aa1900bb3d27e6e4c64dec310e4bc721d6ebfbfeecf995318114b4db6b4 | def run(self):
'Top-level method in class for preprocessing the data for LDA model'
logger.info('Starting data processing for LDA...')
logger.info('Starting to tokenize dataset...')
for i in tqdm(range(0, len(self.df.headline))):
headline = self.df.headline[i]
tokens = self.prepare_text_... | Top-level method in class for preprocessing the data for LDA model | src/models/lda.py | run | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def run(self):
logger.info('Starting data processing for LDA...')
logger.info('Starting to tokenize dataset...')
for i in tqdm(range(0, len(self.df.headline))):
headline = self.df.headline[i]
tokens = self.prepare_text_for_lda(headline)
self.text_data.append(tokens)
logger.i... | def run(self):
logger.info('Starting data processing for LDA...')
logger.info('Starting to tokenize dataset...')
for i in tqdm(range(0, len(self.df.headline))):
headline = self.df.headline[i]
tokens = self.prepare_text_for_lda(headline)
self.text_data.append(tokens)
logger.i... |
11bdec5440c058846382461f7f439788e9a80e10b93c7df5bee32d11b6df64d2 | def model(self):
'this function is to tokenize the headline into a list of individual words'
ldamodel = gensim.models.ldamodel.LdaModel(self.corpus, num_topics=self.NUM_TOPICS, id2word=self.dictionary, passes=15)
ldamodel.save('result/visualization/{}.gensim'.format((str(self.NUM_TOPICS) + '_Topic')))
l... | this function is to tokenize the headline into a list of individual words | src/models/lda.py | model | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def model(self):
ldamodel = gensim.models.ldamodel.LdaModel(self.corpus, num_topics=self.NUM_TOPICS, id2word=self.dictionary, passes=15)
ldamodel.save('result/visualization/{}.gensim'.format((str(self.NUM_TOPICS) + '_Topic')))
logger.info('LDA Model saved as visualization/{}.gensim in visualization fol... | def model(self):
ldamodel = gensim.models.ldamodel.LdaModel(self.corpus, num_topics=self.NUM_TOPICS, id2word=self.dictionary, passes=15)
ldamodel.save('result/visualization/{}.gensim'.format((str(self.NUM_TOPICS) + '_Topic')))
logger.info('LDA Model saved as visualization/{}.gensim in visualization fol... |
2824b756a08deb1f49b3539b698ec1bff23eda28e1b9667347d20ad996467120 | def run(self):
'Top-level method in class for running the LDA to generate the HTML visualizations'
self.model() | Top-level method in class for running the LDA to generate the HTML visualizations | src/models/lda.py | run | jhwong18/Sarcasm-Detector-for-News-Headline- | 0 | python | def run(self):
self.model() | def run(self):
self.model()<|docstring|>Top-level method in class for running the LDA to generate the HTML visualizations<|endoftext|> |
87d19c3b3135ee6845d713f0c4a2f1620cb1e481eab32c6c4d4020e2d7ffdd3c | def kgas(u10, Sc, *, param='W14'):
'\n DESCRIPTION:\n ----------\n Calculate gas transfer piston velocity for diffusive gas exchange \n as a function of schmidt number using a range of published wind speed based\n parameterizations \n \n INPUTS:\n ----------\n u10 10-m wind spee... | DESCRIPTION:
----------
Calculate gas transfer piston velocity for diffusive gas exchange
as a function of schmidt number using a range of published wind speed based
parameterizations
INPUTS:
----------
u10 10-m wind speed (m/s)
Sc Schmidt number
param abbreviation for parameterization:
... | gasex/airsea.py | kgas | dnicholson/gasex-python | 1 | python | def kgas(u10, Sc, *, param='W14'):
'\n DESCRIPTION:\n ----------\n Calculate gas transfer piston velocity for diffusive gas exchange \n as a function of schmidt number using a range of published wind speed based\n parameterizations \n \n INPUTS:\n ----------\n u10 10-m wind spee... | def kgas(u10, Sc, *, param='W14'):
'\n DESCRIPTION:\n ----------\n Calculate gas transfer piston velocity for diffusive gas exchange \n as a function of schmidt number using a range of published wind speed based\n parameterizations \n \n INPUTS:\n ----------\n u10 10-m wind spee... |
c47f82dc64ea2d87d6f6cf6eb34744bd305703598b6c91e10fa5c1de1d78d4d2 | def fsa(C, u10, SP, T, *, slp=1.0, gas=None, param='W14', rh=1):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n F = k (C - Ceq_slp)\n \n INPUTS:\n ----------\n C Surface dissolved gas concentration [mol m-3 == mmol L-1] ... | DESCRIPTION
-------------
Diffusive gas flux across the air-sea interface in mol m-2 s-1
F = k (C - Ceq_slp)
INPUTS:
----------
C Surface dissolved gas concentration [mol m-3 == mmol L-1]
u10 10-m wind speed [m s-1]
SP Practical Salinity ... | gasex/airsea.py | fsa | dnicholson/gasex-python | 1 | python | def fsa(C, u10, SP, T, *, slp=1.0, gas=None, param='W14', rh=1):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n F = k (C - Ceq_slp)\n \n INPUTS:\n ----------\n C Surface dissolved gas concentration [mol m-3 == mmol L-1] ... | def fsa(C, u10, SP, T, *, slp=1.0, gas=None, param='W14', rh=1):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n F = k (C - Ceq_slp)\n \n INPUTS:\n ----------\n C Surface dissolved gas concentration [mol m-3 == mmol L-1] ... |
c358f8c3e42ba314766ebaa4cda682dd0dd4630ecae5b273230ae75927b30bab | def fsa_pC(pC_w, pC_a, u10, SP, T, *, gas=None, param='W14'):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n INPUTS:\n ----------\n pC_w dissolved partial pressure (or fugacity) [uatm] \n pC_a air-side partial pressure (or ... | DESCRIPTION
-------------
Diffusive gas flux across the air-sea interface in mol m-2 s-1
INPUTS:
----------
pC_w dissolved partial pressure (or fugacity) [uatm]
pC_a air-side partial pressure (or fugacity) [uatm]
u10 10-m wind speed [m s-1]
SP Practical Salinity ... | gasex/airsea.py | fsa_pC | dnicholson/gasex-python | 1 | python | def fsa_pC(pC_w, pC_a, u10, SP, T, *, gas=None, param='W14'):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n INPUTS:\n ----------\n pC_w dissolved partial pressure (or fugacity) [uatm] \n pC_a air-side partial pressure (or ... | def fsa_pC(pC_w, pC_a, u10, SP, T, *, gas=None, param='W14'):
'\n DESCRIPTION\n -------------\n Diffusive gas flux across the air-sea interface in mol m-2 s-1\n \n INPUTS:\n ----------\n pC_w dissolved partial pressure (or fugacity) [uatm] \n pC_a air-side partial pressure (or ... |
425e423e693e628c825d45a34076cf1257018d070b121efa0f079ab7a1b42def | @match_args_return
def L13(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % fas_L13: Function to calculate air-sea fluxes with Liang 2013\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % [Fd, Fc, Fp, Deq, k] = fas_L13(C,u10,S... | % fas_L13: Function to calculate air-sea fluxes with Liang 2013
% parameterization
%
% USAGE:-------------------------------------------------------------------
% [Fd, Fc, Fp, Deq, k] = fas_L13(C,u10,S,T,slp,gas,rh)
% [Fd, Fc, Fp, Deq, k] = fas_L13(0.01410,5,35,10,1,'Ar',0.9)
% >Fd = -5.2641e-09
% >Fc = 1.3605e-10
... | gasex/airsea.py | L13 | dnicholson/gasex-python | 1 | python | @match_args_return
def L13(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % fas_L13: Function to calculate air-sea fluxes with Liang 2013\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % [Fd, Fc, Fp, Deq, k] = fas_L13(C,u10,S... | @match_args_return
def L13(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % fas_L13: Function to calculate air-sea fluxes with Liang 2013\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % [Fd, Fc, Fp, Deq, k] = fas_L13(C,u10,S... |
da91dbc91e0c3e65266750665b3107de31db07660b0cac3a720411ea5bd60d37 | @match_args_return
def N16(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % Function to calculate air-sea gas exchange flux using Nicholson 16\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % \n % [Fd, Fc, Fp, Deq, k] = f... | % Function to calculate air-sea gas exchange flux using Nicholson 16
% parameterization
%
% USAGE:-------------------------------------------------------------------
%
% [Fd, Fc, Fp, Deq, k] = fas_N11(C,u10,S,T,slp,gas,rh)
% [Fd, Fc, Fp, Deq, k] = fas_N11(0.01410,5,35,10,1,'Ar',0.9)
%
% Fd = -4.4860e-09
% Fc = 1.9911... | gasex/airsea.py | N16 | dnicholson/gasex-python | 1 | python | @match_args_return
def N16(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % Function to calculate air-sea gas exchange flux using Nicholson 16\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % \n % [Fd, Fc, Fp, Deq, k] = f... | @match_args_return
def N16(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n % Function to calculate air-sea gas exchange flux using Nicholson 16\n % parameterization\n %\n % USAGE:-------------------------------------------------------------------\n % \n % [Fd, Fc, Fp, Deq, k] = f... |
773e0edee186a1ff4341e1207f60964f0b31b511acc7d6a8dded6dfcb674d472 | def N11(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n Same as N16 above but with:\n Ainj = 2.51e-9 / 1.5\n Aex = 1.15e-5 / 1.5\n \n % REFERENCE:---------------------------------------------------------------\n % Nicholson, D., S. Emerson, S. Khatiwala, R. C. Hamme (2... | Same as N16 above but with:
Ainj = 2.51e-9 / 1.5
Aex = 1.15e-5 / 1.5
% REFERENCE:---------------------------------------------------------------
% Nicholson, D., S. Emerson, S. Khatiwala, R. C. Hamme (2011)
% An inverse approach to estimate bubble-mediated air-sea gas flux from
% inert gas measurement... | gasex/airsea.py | N11 | dnicholson/gasex-python | 1 | python | def N11(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n Same as N16 above but with:\n Ainj = 2.51e-9 / 1.5\n Aex = 1.15e-5 / 1.5\n \n % REFERENCE:---------------------------------------------------------------\n % Nicholson, D., S. Emerson, S. Khatiwala, R. C. Hamme (2... | def N11(C, u10, SP, pt, *, slp=1.0, gas=None, rh=1.0, chi_atm=None):
'\n Same as N16 above but with:\n Ainj = 2.51e-9 / 1.5\n Aex = 1.15e-5 / 1.5\n \n % REFERENCE:---------------------------------------------------------------\n % Nicholson, D., S. Emerson, S. Khatiwala, R. C. Hamme (2... |
34277ad2937582f25ee01918811ffe2b4aa9cca579dfd4bdee34e34415e3e115 | def __init__(self, name='maxwellplanestraintimedep'):
'\n Constructor.\n '
ElasticMaterialApp.__init__(self, name)
numLocs = 2
self.dimension = dimension
self.numLocs = numLocs
self.dbPropertyValues = ['density', 'vs', 'vp', 'viscosity']
self.propertyValues = ['density', 'mu', 'lambda'... | Constructor. | tests/libtests/materials/data/obsolete/MaxwellPlaneStrainTimeDep.py | __init__ | reykoki/pylith | 93 | python | def __init__(self, name='maxwellplanestraintimedep'):
'\n \n '
ElasticMaterialApp.__init__(self, name)
numLocs = 2
self.dimension = dimension
self.numLocs = numLocs
self.dbPropertyValues = ['density', 'vs', 'vp', 'viscosity']
self.propertyValues = ['density', 'mu', 'lambda', 'maxwellTi... | def __init__(self, name='maxwellplanestraintimedep'):
'\n \n '
ElasticMaterialApp.__init__(self, name)
numLocs = 2
self.dimension = dimension
self.numLocs = numLocs
self.dbPropertyValues = ['density', 'vs', 'vp', 'viscosity']
self.propertyValues = ['density', 'mu', 'lambda', 'maxwellTi... |
f47265b5ab256efa7d09b5fd889397340540cc0c3fc9228eef05c3bb78c12d4e | def _calcStressComponent(self, strainVal, strainComp, stressComp, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, totalStrainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n Function to compute a particular stress component as a function of a\n strain component.\n '
strainTest = numpy.arra... | Function to compute a particular stress component as a function of a
strain component. | tests/libtests/materials/data/obsolete/MaxwellPlaneStrainTimeDep.py | _calcStressComponent | reykoki/pylith | 93 | python | def _calcStressComponent(self, strainVal, strainComp, stressComp, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, totalStrainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n Function to compute a particular stress component as a function of a\n strain component.\n '
strainTest = numpy.arra... | def _calcStressComponent(self, strainVal, strainComp, stressComp, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, totalStrainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n Function to compute a particular stress component as a function of a\n strain component.\n '
strainTest = numpy.arra... |
1d3974401e03b09d898ac0c4aaa393d5baecae516b42d8dacc8fedd600232e52 | def _computeStress(self, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, strainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n Function to compute stresses and viscous strains for a given strain.\n '
bulkModulus = (lambdaV + ((2.0 * muV) / 3.0))
diag = [1.0, 1.0, 0.0]
meanStrainIniti... | Function to compute stresses and viscous strains for a given strain. | tests/libtests/materials/data/obsolete/MaxwellPlaneStrainTimeDep.py | _computeStress | reykoki/pylith | 93 | python | def _computeStress(self, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, strainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n \n '
bulkModulus = (lambdaV + ((2.0 * muV) / 3.0))
diag = [1.0, 1.0, 0.0]
meanStrainInitial = ((initialStrain[0] + initialStrain[1]) / 3.0)
meanStressIni... | def _computeStress(self, strainTpdt, muV, lambdaV, maxwellTimeV, dqV, strainT, viscousStrainT, initialStress, initialStrain, stateVars):
'\n \n '
bulkModulus = (lambdaV + ((2.0 * muV) / 3.0))
diag = [1.0, 1.0, 0.0]
meanStrainInitial = ((initialStrain[0] + initialStrain[1]) / 3.0)
meanStressIni... |
87b05fe1337e02fc58ff7b72711555b138e90357528aa54f201c7b24033dc588 | def _computeViscousFactor(self, maxwellTime):
'\n Compute viscous strain factor for a given Maxwell time.\n '
timeFrac = 1e-05
numTerms = 5
dq = 0.0
if (maxwellTime < (timeFrac * self.dt)):
fSign = 1.0
factorial = 1.0
fraction = 1.0
dq = 1.0
for iTerm in... | Compute viscous strain factor for a given Maxwell time. | tests/libtests/materials/data/obsolete/MaxwellPlaneStrainTimeDep.py | _computeViscousFactor | reykoki/pylith | 93 | python | def _computeViscousFactor(self, maxwellTime):
'\n \n '
timeFrac = 1e-05
numTerms = 5
dq = 0.0
if (maxwellTime < (timeFrac * self.dt)):
fSign = 1.0
factorial = 1.0
fraction = 1.0
dq = 1.0
for iTerm in range(2, (numTerms + 1)):
factorial *= iTe... | def _computeViscousFactor(self, maxwellTime):
'\n \n '
timeFrac = 1e-05
numTerms = 5
dq = 0.0
if (maxwellTime < (timeFrac * self.dt)):
fSign = 1.0
factorial = 1.0
fraction = 1.0
dq = 1.0
for iTerm in range(2, (numTerms + 1)):
factorial *= iTe... |
c553a7f1e37d9e67b8b0724d7bfe990f72db9e00773a44ed76bcc080d058f0df | def _calcStress(self, strainV, muV, lambdaV, maxwellTimeV, totalStrainV, viscousStrainV, initialStressV, initialStrainV, stateVars):
'\n Compute stress, derivative of elasticity matrix, and updated state\n variables. This assumes behavior is always viscoelastic.\n '
import scipy.misc
strainTpdt = n... | Compute stress, derivative of elasticity matrix, and updated state
variables. This assumes behavior is always viscoelastic. | tests/libtests/materials/data/obsolete/MaxwellPlaneStrainTimeDep.py | _calcStress | reykoki/pylith | 93 | python | def _calcStress(self, strainV, muV, lambdaV, maxwellTimeV, totalStrainV, viscousStrainV, initialStressV, initialStrainV, stateVars):
'\n Compute stress, derivative of elasticity matrix, and updated state\n variables. This assumes behavior is always viscoelastic.\n '
import scipy.misc
strainTpdt = n... | def _calcStress(self, strainV, muV, lambdaV, maxwellTimeV, totalStrainV, viscousStrainV, initialStressV, initialStrainV, stateVars):
'\n Compute stress, derivative of elasticity matrix, and updated state\n variables. This assumes behavior is always viscoelastic.\n '
import scipy.misc
strainTpdt = n... |
32f0fb8cdf5e2f42952d9cc22154bebce6d98c91370c2a40eb23a66d0966e0ee | def write_version_py(filename):
'Write version.'
cnt = '"""THIS FILE IS GENERATED FROM beem SETUP.PY."""\nversion = \'%(version)s\'\n'
with open(filename, 'w') as a:
a.write((cnt % {'version': VERSION})) | Write version. | setup.py | write_version_py | orionspeakgaming/orionsdistributor | 4 | python | def write_version_py(filename):
cnt = '"THIS FILE IS GENERATED FROM beem SETUP.PY."\nversion = \'%(version)s\'\n'
with open(filename, 'w') as a:
a.write((cnt % {'version': VERSION})) | def write_version_py(filename):
cnt = '"THIS FILE IS GENERATED FROM beem SETUP.PY."\nversion = \'%(version)s\'\n'
with open(filename, 'w') as a:
a.write((cnt % {'version': VERSION}))<|docstring|>Write version.<|endoftext|> |
0d97e43b0fd948847557d7985c7472ac7767af69223aee3e82432e4cec55d6b3 | def get_long_description():
'Generate a long description from the README file.'
descr = []
for fname in ('README.md',):
with io.open(fname, encoding='utf-8') as f:
descr.append(f.read())
return '\n\n'.join(descr) | Generate a long description from the README file. | setup.py | get_long_description | orionspeakgaming/orionsdistributor | 4 | python | def get_long_description():
descr = []
for fname in ('README.md',):
with io.open(fname, encoding='utf-8') as f:
descr.append(f.read())
return '\n\n'.join(descr) | def get_long_description():
descr = []
for fname in ('README.md',):
with io.open(fname, encoding='utf-8') as f:
descr.append(f.read())
return '\n\n'.join(descr)<|docstring|>Generate a long description from the README file.<|endoftext|> |
c63a9cf792f48e24c859f58a25a43fbf7183c8cd87d6e3d4fe4233aa72c35fb5 | def scramble_native_password(password, message):
'Scramble used for mysql_native_password'
if (not password):
return b''
stage1 = sha1_new(password).digest()
stage2 = sha1_new(stage1).digest()
s = sha1_new()
s.update(message[:SCRAMBLE_LENGTH])
s.update(stage2)
result = s.digest()... | Scramble used for mysql_native_password | venv/Lib/site-packages/pymysql/_auth.py | scramble_native_password | eladb21/SlowMapping | 6,773 | python | def scramble_native_password(password, message):
if (not password):
return b
stage1 = sha1_new(password).digest()
stage2 = sha1_new(stage1).digest()
s = sha1_new()
s.update(message[:SCRAMBLE_LENGTH])
s.update(stage2)
result = s.digest()
return _my_crypt(result, stage1) | def scramble_native_password(password, message):
if (not password):
return b
stage1 = sha1_new(password).digest()
stage2 = sha1_new(stage1).digest()
s = sha1_new()
s.update(message[:SCRAMBLE_LENGTH])
s.update(stage2)
result = s.digest()
return _my_crypt(result, stage1)<|docs... |
47bbc7529365041252561f90554d28c0423b60dc73d287802d3f3cf642a76f33 | def ed25519_password(password, scramble):
'Sign a random scramble with elliptic curve Ed25519.\n\n Secret and public key are derived from password.\n '
if (not _nacl_bindings):
_init_nacl()
h = hashlib.sha512(password).digest()
s = _scalar_clamp(h[:32])
r = hashlib.sha512((h[32:] + scr... | Sign a random scramble with elliptic curve Ed25519.
Secret and public key are derived from password. | venv/Lib/site-packages/pymysql/_auth.py | ed25519_password | eladb21/SlowMapping | 6,773 | python | def ed25519_password(password, scramble):
'Sign a random scramble with elliptic curve Ed25519.\n\n Secret and public key are derived from password.\n '
if (not _nacl_bindings):
_init_nacl()
h = hashlib.sha512(password).digest()
s = _scalar_clamp(h[:32])
r = hashlib.sha512((h[32:] + scr... | def ed25519_password(password, scramble):
'Sign a random scramble with elliptic curve Ed25519.\n\n Secret and public key are derived from password.\n '
if (not _nacl_bindings):
_init_nacl()
h = hashlib.sha512(password).digest()
s = _scalar_clamp(h[:32])
r = hashlib.sha512((h[32:] + scr... |
4bfc4874883af7119400338913755964037c8d6518c88b8a6df5d95e17a08552 | def sha2_rsa_encrypt(password, salt, public_key):
'Encrypt password with salt and public_key.\n\n Used for sha256_password and caching_sha2_password.\n '
if (not _have_cryptography):
raise RuntimeError("'cryptography' package is required for sha256_password or caching_sha2_password auth methods")
... | Encrypt password with salt and public_key.
Used for sha256_password and caching_sha2_password. | venv/Lib/site-packages/pymysql/_auth.py | sha2_rsa_encrypt | eladb21/SlowMapping | 6,773 | python | def sha2_rsa_encrypt(password, salt, public_key):
'Encrypt password with salt and public_key.\n\n Used for sha256_password and caching_sha2_password.\n '
if (not _have_cryptography):
raise RuntimeError("'cryptography' package is required for sha256_password or caching_sha2_password auth methods")
... | def sha2_rsa_encrypt(password, salt, public_key):
'Encrypt password with salt and public_key.\n\n Used for sha256_password and caching_sha2_password.\n '
if (not _have_cryptography):
raise RuntimeError("'cryptography' package is required for sha256_password or caching_sha2_password auth methods")
... |
285f95fb3588b8c540314d00b2917eace9be94b8d61e7f7bdefde8cd47e477d1 | def scramble_caching_sha2(password, nonce):
'Scramble algorithm used in cached_sha2_password fast path.\n\n XOR(SHA256(password), SHA256(SHA256(SHA256(password)), nonce))\n '
if (not password):
return b''
p1 = hashlib.sha256(password).digest()
p2 = hashlib.sha256(p1).digest()
p3 = hash... | Scramble algorithm used in cached_sha2_password fast path.
XOR(SHA256(password), SHA256(SHA256(SHA256(password)), nonce)) | venv/Lib/site-packages/pymysql/_auth.py | scramble_caching_sha2 | eladb21/SlowMapping | 6,773 | python | def scramble_caching_sha2(password, nonce):
'Scramble algorithm used in cached_sha2_password fast path.\n\n XOR(SHA256(password), SHA256(SHA256(SHA256(password)), nonce))\n '
if (not password):
return b
p1 = hashlib.sha256(password).digest()
p2 = hashlib.sha256(p1).digest()
p3 = hashli... | def scramble_caching_sha2(password, nonce):
'Scramble algorithm used in cached_sha2_password fast path.\n\n XOR(SHA256(password), SHA256(SHA256(SHA256(password)), nonce))\n '
if (not password):
return b
p1 = hashlib.sha256(password).digest()
p2 = hashlib.sha256(p1).digest()
p3 = hashli... |
e4605c014f346e24f4d06c00412f51d58ee0f632001529f3648bf26e70e0764e | def __str__(self):
'Metodo magico que podemos subreescribir(Overridw) parar devovler lo que nosostro deseamos'
return 'Yo soy la nueva definicion de la clase' | Metodo magico que podemos subreescribir(Overridw) parar devovler lo que nosostro deseamos | Seman4/Dia4-python/03-funcion-new.py | __str__ | GuidoTorres/codigo8 | 0 | python | def __str__(self):
return 'Yo soy la nueva definicion de la clase' | def __str__(self):
return 'Yo soy la nueva definicion de la clase'<|docstring|>Metodo magico que podemos subreescribir(Overridw) parar devovler lo que nosostro deseamos<|endoftext|> |
b8af30f14a3e57f5fa1b28de37d4d03845d8fcbf32a5151f12e51aae6de4799b | def __add__(self, otro):
'MEtodo magico que sirve para incrementar el mismo objeto con otro'
x = (self.x + otro.x)
y = (self.y + otro.y)
return (x, y) | MEtodo magico que sirve para incrementar el mismo objeto con otro | Seman4/Dia4-python/03-funcion-new.py | __add__ | GuidoTorres/codigo8 | 0 | python | def __add__(self, otro):
x = (self.x + otro.x)
y = (self.y + otro.y)
return (x, y) | def __add__(self, otro):
x = (self.x + otro.x)
y = (self.y + otro.y)
return (x, y)<|docstring|>MEtodo magico que sirve para incrementar el mismo objeto con otro<|endoftext|> |
6e6a93ad1922335239c2acccfb04cf754db41b704f937900066a2998e64dae53 | @property
def view(self):
'\n returns the :class:`QtWidgets.QGraphicsItem` used in the scene.\n\n Returns:\n NodeGraphQt.qgraphics.port.PortItem: port item.\n '
return self.__view | returns the :class:`QtWidgets.QGraphicsItem` used in the scene.
Returns:
NodeGraphQt.qgraphics.port.PortItem: port item. | NodeGraphQt/base/port.py | view | githeshuai/NodeGraphQt | 3 | python | @property
def view(self):
'\n returns the :class:`QtWidgets.QGraphicsItem` used in the scene.\n\n Returns:\n NodeGraphQt.qgraphics.port.PortItem: port item.\n '
return self.__view | @property
def view(self):
'\n returns the :class:`QtWidgets.QGraphicsItem` used in the scene.\n\n Returns:\n NodeGraphQt.qgraphics.port.PortItem: port item.\n '
return self.__view<|docstring|>returns the :class:`QtWidgets.QGraphicsItem` used in the scene.
Returns:
NodeGraphQ... |
59e1e497289a8aecac2d283b2f86c6313f0aa7b98e7f70a1669a913c53ce99f8 | @property
def model(self):
'\n returns the port model.\n\n Returns:\n NodeGraphQt.base.model.PortModel: port model.\n '
return self.__model | returns the port model.
Returns:
NodeGraphQt.base.model.PortModel: port model. | NodeGraphQt/base/port.py | model | githeshuai/NodeGraphQt | 3 | python | @property
def model(self):
'\n returns the port model.\n\n Returns:\n NodeGraphQt.base.model.PortModel: port model.\n '
return self.__model | @property
def model(self):
'\n returns the port model.\n\n Returns:\n NodeGraphQt.base.model.PortModel: port model.\n '
return self.__model<|docstring|>returns the port model.
Returns:
NodeGraphQt.base.model.PortModel: port model.<|endoftext|> |
037291aea40819fab382da9ad11a8a390a377e14bb09a0cf2704cf7d4f3542b0 | def type_(self):
'\n Returns the port type.\n\n Port Types:\n - :attr:`NodeGraphQt.constants.IN_PORT` for input port\n - :attr:`NodeGraphQt.constants.OUT_PORT` for output port\n\n Returns:\n str: port connection type.\n '
return self.model.type_ | Returns the port type.
Port Types:
- :attr:`NodeGraphQt.constants.IN_PORT` for input port
- :attr:`NodeGraphQt.constants.OUT_PORT` for output port
Returns:
str: port connection type. | NodeGraphQt/base/port.py | type_ | githeshuai/NodeGraphQt | 3 | python | def type_(self):
'\n Returns the port type.\n\n Port Types:\n - :attr:`NodeGraphQt.constants.IN_PORT` for input port\n - :attr:`NodeGraphQt.constants.OUT_PORT` for output port\n\n Returns:\n str: port connection type.\n '
return self.model.type_ | def type_(self):
'\n Returns the port type.\n\n Port Types:\n - :attr:`NodeGraphQt.constants.IN_PORT` for input port\n - :attr:`NodeGraphQt.constants.OUT_PORT` for output port\n\n Returns:\n str: port connection type.\n '
return self.model.type_<|docs... |
e2bfd70912ec373d910ac3f5e22e495d50f27c688ab2dc007cdf755fb9a22bc7 | def multi_connection(self):
'\n Returns if the ports is a single connection or not.\n\n Returns:\n bool: false if port is a single connection port\n '
return self.model.multi_connection | Returns if the ports is a single connection or not.
Returns:
bool: false if port is a single connection port | NodeGraphQt/base/port.py | multi_connection | githeshuai/NodeGraphQt | 3 | python | def multi_connection(self):
'\n Returns if the ports is a single connection or not.\n\n Returns:\n bool: false if port is a single connection port\n '
return self.model.multi_connection | def multi_connection(self):
'\n Returns if the ports is a single connection or not.\n\n Returns:\n bool: false if port is a single connection port\n '
return self.model.multi_connection<|docstring|>Returns if the ports is a single connection or not.
Returns:
bool: false if p... |
7a6c450da1696c987252090c419f59c5f076b3286ac64ceae7cd3bf376822664 | def node(self):
'\n Return the parent node.\n\n Returns:\n NodeGraphQt.BaseNode: parent node object.\n '
return self.model.node | Return the parent node.
Returns:
NodeGraphQt.BaseNode: parent node object. | NodeGraphQt/base/port.py | node | githeshuai/NodeGraphQt | 3 | python | def node(self):
'\n Return the parent node.\n\n Returns:\n NodeGraphQt.BaseNode: parent node object.\n '
return self.model.node | def node(self):
'\n Return the parent node.\n\n Returns:\n NodeGraphQt.BaseNode: parent node object.\n '
return self.model.node<|docstring|>Return the parent node.
Returns:
NodeGraphQt.BaseNode: parent node object.<|endoftext|> |
519ac3fe76d5b37515e6f9c841bac46ecc366258d642d589d4e81ec86445fc53 | def name(self):
'\n Returns the port name.\n\n Returns:\n str: port name.\n '
return self.model.name | Returns the port name.
Returns:
str: port name. | NodeGraphQt/base/port.py | name | githeshuai/NodeGraphQt | 3 | python | def name(self):
'\n Returns the port name.\n\n Returns:\n str: port name.\n '
return self.model.name | def name(self):
'\n Returns the port name.\n\n Returns:\n str: port name.\n '
return self.model.name<|docstring|>Returns the port name.
Returns:
str: port name.<|endoftext|> |
2695663d81176cf7eb507f803f6c67aee7e3be97ee9c60640bf16a3f8029c7cd | def visible(self):
'\n Port visible in the node graph.\n\n Returns:\n bool: true if visible.\n '
return self.model.visible | Port visible in the node graph.
Returns:
bool: true if visible. | NodeGraphQt/base/port.py | visible | githeshuai/NodeGraphQt | 3 | python | def visible(self):
'\n Port visible in the node graph.\n\n Returns:\n bool: true if visible.\n '
return self.model.visible | def visible(self):
'\n Port visible in the node graph.\n\n Returns:\n bool: true if visible.\n '
return self.model.visible<|docstring|>Port visible in the node graph.
Returns:
bool: true if visible.<|endoftext|> |
afe387bbf6538c2e59cec919a24c391b7694175dd10ed3937edfb6b77b8a4784 | def set_visible(self, visible=True):
'\n Sets weather the port should be visible or not.\n\n Args:\n visible (bool): true if visible.\n '
self.model.visible = visible
label = ('show' if visible else 'hide')
undo_stack = self.node().graph.undo_stack()
undo_stack.beginM... | Sets weather the port should be visible or not.
Args:
visible (bool): true if visible. | NodeGraphQt/base/port.py | set_visible | githeshuai/NodeGraphQt | 3 | python | def set_visible(self, visible=True):
'\n Sets weather the port should be visible or not.\n\n Args:\n visible (bool): true if visible.\n '
self.model.visible = visible
label = ('show' if visible else 'hide')
undo_stack = self.node().graph.undo_stack()
undo_stack.beginM... | def set_visible(self, visible=True):
'\n Sets weather the port should be visible or not.\n\n Args:\n visible (bool): true if visible.\n '
self.model.visible = visible
label = ('show' if visible else 'hide')
undo_stack = self.node().graph.undo_stack()
undo_stack.beginM... |
88afdeb816a433e935b30fed4e2cf364ba16daaa55532aded3fc18ed6b08b78d | def connected_ports(self):
'\n Returns all connected ports.\n\n Returns:\n list[NodeGraphQt.Port]: list of connected ports.\n '
ports = []
graph = self.node().graph
for (node_id, port_names) in self.model.connected_ports.items():
for port_name in port_names:
... | Returns all connected ports.
Returns:
list[NodeGraphQt.Port]: list of connected ports. | NodeGraphQt/base/port.py | connected_ports | githeshuai/NodeGraphQt | 3 | python | def connected_ports(self):
'\n Returns all connected ports.\n\n Returns:\n list[NodeGraphQt.Port]: list of connected ports.\n '
ports = []
graph = self.node().graph
for (node_id, port_names) in self.model.connected_ports.items():
for port_name in port_names:
... | def connected_ports(self):
'\n Returns all connected ports.\n\n Returns:\n list[NodeGraphQt.Port]: list of connected ports.\n '
ports = []
graph = self.node().graph
for (node_id, port_names) in self.model.connected_ports.items():
for port_name in port_names:
... |
f05aac77da339489796b2e399565ca9645e5b8cd576be863f7cb7b269f414bbd | def connect_to(self, port=None):
'\n Create connection to the specified port and emits the\n :attr:`NodeGraph.port_connected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().grap... | Create connection to the specified port and emits the
:attr:`NodeGraph.port_connected` signal from the parent node graph.
Args:
port (NodeGraphQt.Port): port object. | NodeGraphQt/base/port.py | connect_to | githeshuai/NodeGraphQt | 3 | python | def connect_to(self, port=None):
'\n Create connection to the specified port and emits the\n :attr:`NodeGraph.port_connected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().grap... | def connect_to(self, port=None):
'\n Create connection to the specified port and emits the\n :attr:`NodeGraph.port_connected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().grap... |
f8f9a1e3fa6241067ce7f3630cc6ed9c74ff184285d6993be980388d1f32c856 | def disconnect_from(self, port=None):
'\n Disconnect from the specified port and emits the\n :attr:`NodeGraph.port_disconnected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().g... | Disconnect from the specified port and emits the
:attr:`NodeGraph.port_disconnected` signal from the parent node graph.
Args:
port (NodeGraphQt.Port): port object. | NodeGraphQt/base/port.py | disconnect_from | githeshuai/NodeGraphQt | 3 | python | def disconnect_from(self, port=None):
'\n Disconnect from the specified port and emits the\n :attr:`NodeGraph.port_disconnected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().g... | def disconnect_from(self, port=None):
'\n Disconnect from the specified port and emits the\n :attr:`NodeGraph.port_disconnected` signal from the parent node graph.\n\n Args:\n port (NodeGraphQt.Port): port object.\n '
if (not port):
return
graph = self.node().g... |
2e4a80e228adfcf152cc4685d4336fab1dd5072c418787a1d3ee9e20f71e15ea | def test_get_order_state(self):
'\n Test case for get_order_state\n\n \n '
pass | Test case for get_order_state | test/test_order_states_api.py | test_get_order_state | kinow-io/kaemo-python-sdk | 1 | python | def test_get_order_state(self):
'\n \n\n \n '
pass | def test_get_order_state(self):
'\n \n\n \n '
pass<|docstring|>Test case for get_order_state<|endoftext|> |
ce3ab495c74d411a30e1987ad137b6d86b3b0a70781d01472ca1ca45318f6119 | def test_get_order_states(self):
'\n Test case for get_order_states\n\n \n '
pass | Test case for get_order_states | test/test_order_states_api.py | test_get_order_states | kinow-io/kaemo-python-sdk | 1 | python | def test_get_order_states(self):
'\n \n\n \n '
pass | def test_get_order_states(self):
'\n \n\n \n '
pass<|docstring|>Test case for get_order_states<|endoftext|> |
e6622296317564a6edb0ec2bac9c32c886f9b3536db0a307ca99fea0f3f27ef5 | def get_view(scope: Optional[str]=None, view_id: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetViewResult:
'\n This data source provides details about a specific View resource in Oracle Cloud Infrastructure DNS service.\n\n Gets information about a specific view. Note that atte... | This data source provides details about a specific View resource in Oracle Cloud Infrastructure DNS service.
Gets information about a specific view. Note that attempting to get a
view in the DELETED lifecycleState will result in a `404` response to be
consistent with other operations of the API. Requires a `PRIVATE` s... | sdk/python/pulumi_oci/dns/get_view.py | get_view | pellizzetti/pulumi-oci-dev | 5 | python | def get_view(scope: Optional[str]=None, view_id: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetViewResult:
'\n This data source provides details about a specific View resource in Oracle Cloud Infrastructure DNS service.\n\n Gets information about a specific view. Note that atte... | def get_view(scope: Optional[str]=None, view_id: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetViewResult:
'\n This data source provides details about a specific View resource in Oracle Cloud Infrastructure DNS service.\n\n Gets information about a specific view. Note that atte... |
1dfd23e772c9d12f277a2a59e846ed9f9886df38add83baa4332ae51ce5b156c | @property
@pulumi.getter(name='compartmentId')
def compartment_id(self) -> str:
'\n The OCID of the owning compartment.\n '
return pulumi.get(self, 'compartment_id') | The OCID of the owning compartment. | sdk/python/pulumi_oci/dns/get_view.py | compartment_id | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='compartmentId')
def compartment_id(self) -> str:
'\n \n '
return pulumi.get(self, 'compartment_id') | @property
@pulumi.getter(name='compartmentId')
def compartment_id(self) -> str:
'\n \n '
return pulumi.get(self, 'compartment_id')<|docstring|>The OCID of the owning compartment.<|endoftext|> |
e07f63f490e4409f2a7ff7ffe42b86524f7e3432d61c83fd8d97fa0170ff3637 | @property
@pulumi.getter(name='definedTags')
def defined_tags(self) -> Mapping[(str, Any)]:
'\n Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).\n '... | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). | sdk/python/pulumi_oci/dns/get_view.py | defined_tags | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='definedTags')
def defined_tags(self) -> Mapping[(str, Any)]:
'\n \n '
return pulumi.get(self, 'defined_tags') | @property
@pulumi.getter(name='definedTags')
def defined_tags(self) -> Mapping[(str, Any)]:
'\n \n '
return pulumi.get(self, 'defined_tags')<|docstring|>Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.or... |
264d0426688650e764b11c757071aa224fcc5abc73df264510bab1b7e1fb7b0b | @property
@pulumi.getter(name='displayName')
def display_name(self) -> str:
'\n The display name of the view.\n '
return pulumi.get(self, 'display_name') | The display name of the view. | sdk/python/pulumi_oci/dns/get_view.py | display_name | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='displayName')
def display_name(self) -> str:
'\n \n '
return pulumi.get(self, 'display_name') | @property
@pulumi.getter(name='displayName')
def display_name(self) -> str:
'\n \n '
return pulumi.get(self, 'display_name')<|docstring|>The display name of the view.<|endoftext|> |
beb83ffde49f7ba2b079d4a12f246351538c2001b57005cdff42ee9ae138e620 | @property
@pulumi.getter(name='freeformTags')
def freeform_tags(self) -> Mapping[(str, Any)]:
'\n Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Con... | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). | sdk/python/pulumi_oci/dns/get_view.py | freeform_tags | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='freeformTags')
def freeform_tags(self) -> Mapping[(str, Any)]:
'\n \n '
return pulumi.get(self, 'freeform_tags') | @property
@pulumi.getter(name='freeformTags')
def freeform_tags(self) -> Mapping[(str, Any)]:
'\n \n '
return pulumi.get(self, 'freeform_tags')<|docstring|>Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [... |
0a81bb948883f24ab2ce3d403d101c2f755a2ff125e6ead7443b86e631bba6ff | @property
@pulumi.getter
def id(self) -> str:
'\n The OCID of the view.\n '
return pulumi.get(self, 'id') | The OCID of the view. | sdk/python/pulumi_oci/dns/get_view.py | id | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter
def id(self) -> str:
'\n \n '
return pulumi.get(self, 'id') | @property
@pulumi.getter
def id(self) -> str:
'\n \n '
return pulumi.get(self, 'id')<|docstring|>The OCID of the view.<|endoftext|> |
304284c555dd30aee64c33144b26fd11f747a97f0e75f4532a1fb798aaa66f05 | @property
@pulumi.getter(name='isProtected')
def is_protected(self) -> bool:
'\n A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.\n '
return pulumi.get(self, 'is_protected') | A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. | sdk/python/pulumi_oci/dns/get_view.py | is_protected | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='isProtected')
def is_protected(self) -> bool:
'\n \n '
return pulumi.get(self, 'is_protected') | @property
@pulumi.getter(name='isProtected')
def is_protected(self) -> bool:
'\n \n '
return pulumi.get(self, 'is_protected')<|docstring|>A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.<|endoftext|> |
4fb879927314875365b6ca118bc78a09c7b5a061a4f7fb26ecadd5380ccbab44 | @property
@pulumi.getter
def self(self) -> str:
'\n The canonical absolute URL of the resource.\n '
return pulumi.get(self, 'self') | The canonical absolute URL of the resource. | sdk/python/pulumi_oci/dns/get_view.py | self | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter
def self(self) -> str:
'\n \n '
return pulumi.get(self, 'self') | @property
@pulumi.getter
def self(self) -> str:
'\n \n '
return pulumi.get(self, 'self')<|docstring|>The canonical absolute URL of the resource.<|endoftext|> |
5ca329be548d405ae64a8c3ec0a1d4e45fdebc549228bcf09209bc041e824338 | @property
@pulumi.getter
def state(self) -> str:
'\n The current state of the resource.\n '
return pulumi.get(self, 'state') | The current state of the resource. | sdk/python/pulumi_oci/dns/get_view.py | state | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter
def state(self) -> str:
'\n \n '
return pulumi.get(self, 'state') | @property
@pulumi.getter
def state(self) -> str:
'\n \n '
return pulumi.get(self, 'state')<|docstring|>The current state of the resource.<|endoftext|> |
2593b6ad43bf1cd5e8b14cf3a7628244ed73c0e0fd3ec7930de4f5cd2119d6a4 | @property
@pulumi.getter(name='timeCreated')
def time_created(self) -> str:
'\n The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.\n '
return pulumi.get(self, 'time_created') | The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339. | sdk/python/pulumi_oci/dns/get_view.py | time_created | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='timeCreated')
def time_created(self) -> str:
'\n \n '
return pulumi.get(self, 'time_created') | @property
@pulumi.getter(name='timeCreated')
def time_created(self) -> str:
'\n \n '
return pulumi.get(self, 'time_created')<|docstring|>The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.<|endoftext|> |
3a02653e9ef59a02c7583efba31b44f5100f2f90d5675a63baf53e11c6af674e | @property
@pulumi.getter(name='timeUpdated')
def time_updated(self) -> str:
'\n The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.\n '
return pulumi.get(self, 'time_updated') | The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339. | sdk/python/pulumi_oci/dns/get_view.py | time_updated | pellizzetti/pulumi-oci-dev | 5 | python | @property
@pulumi.getter(name='timeUpdated')
def time_updated(self) -> str:
'\n \n '
return pulumi.get(self, 'time_updated') | @property
@pulumi.getter(name='timeUpdated')
def time_updated(self) -> str:
'\n \n '
return pulumi.get(self, 'time_updated')<|docstring|>The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.<|endoftext|> |
93c34fbdc78f57d71d4f0175f5499a2ade0afb017d69ecd73ad831f9b55fd499 | def loads(self, loaded):
' Load nested namespaced dictionary data from a JSON-encoded string '
self.tree = json.loads(loaded) | Load nested namespaced dictionary data from a JSON-encoded string | clu/config/formats/jsonfile.py | loads | fish2000/CLU | 1 | python | def loads(self, loaded):
' '
self.tree = json.loads(loaded) | def loads(self, loaded):
' '
self.tree = json.loads(loaded)<|docstring|>Load nested namespaced dictionary data from a JSON-encoded string<|endoftext|> |
fa0f87bb2345f2ec2a78f24c544cf84ee9a1ebc364a90ec37b38613679a6b308 | def dumps(self):
' Dump a JSON-encoded string from nested namespaced dictionary data '
return json.dumps(self.tree, **options) | Dump a JSON-encoded string from nested namespaced dictionary data | clu/config/formats/jsonfile.py | dumps | fish2000/CLU | 1 | python | def dumps(self):
' '
return json.dumps(self.tree, **options) | def dumps(self):
' '
return json.dumps(self.tree, **options)<|docstring|>Dump a JSON-encoded string from nested namespaced dictionary data<|endoftext|> |
e03a9738d98c30f5d0307cff75b7c7cf91432f1cf598bc19b5b8027a991cc91a | def _compute_type_chart(chart_path: str) -> Dict[(str, Dict[(str, float)])]:
'Returns the pokemon type_chart.\n\n Returns a dictionnary representing the Pokemon type chart, loaded from a json file\n in `data`. This dictionnary is computed in this file as `TYPE_CHART`.\n\n :return: The pokemon type chart\n ... | Returns the pokemon type_chart.
Returns a dictionnary representing the Pokemon type chart, loaded from a json file
in `data`. This dictionnary is computed in this file as `TYPE_CHART`.
:return: The pokemon type chart
:rtype: Dict[str, Dict[str, float]] | src/poke_env/data.py | _compute_type_chart | cjyu81/MuTrainer | 0 | python | def _compute_type_chart(chart_path: str) -> Dict[(str, Dict[(str, float)])]:
'Returns the pokemon type_chart.\n\n Returns a dictionnary representing the Pokemon type chart, loaded from a json file\n in `data`. This dictionnary is computed in this file as `TYPE_CHART`.\n\n :return: The pokemon type chart\n ... | def _compute_type_chart(chart_path: str) -> Dict[(str, Dict[(str, float)])]:
'Returns the pokemon type_chart.\n\n Returns a dictionnary representing the Pokemon type chart, loaded from a json file\n in `data`. This dictionnary is computed in this file as `TYPE_CHART`.\n\n :return: The pokemon type chart\n ... |
a5ddbf60c835e6b35a177cc3f3905a7b62996942ebd0e9b1c45b2e4cfd40c765 | def test_register():
'Just test that there is no crash'
plugin.register_plugins([timestamp]) | Just test that there is no crash | tests/test_timestamp.py | test_register | slarse/repobee-timestamp | 0 | python | def test_register():
plugin.register_plugins([timestamp]) | def test_register():
plugin.register_plugins([timestamp])<|docstring|>Just test that there is no crash<|endoftext|> |
955cda15b33cf68a84321474a850cb5472baa3114d749629be319d82326c1926 | @contextmanager
def captured_output():
'\n Reassign stdout temporarily in order to test printed statements\n Taken from: https://stackoverflow.com/questions/4219717/how-to-assert-output-with-nosetest-unittest-in-python\n '
(new_out, new_err) = (StringIO(), StringIO())
(old_out, old_err) = (sys.stdo... | Reassign stdout temporarily in order to test printed statements
Taken from: https://stackoverflow.com/questions/4219717/how-to-assert-output-with-nosetest-unittest-in-python | tests/python/test_basic.py | captured_output | yjlhhhh/xgboost | 769 | python | @contextmanager
def captured_output():
'\n Reassign stdout temporarily in order to test printed statements\n Taken from: https://stackoverflow.com/questions/4219717/how-to-assert-output-with-nosetest-unittest-in-python\n '
(new_out, new_err) = (StringIO(), StringIO())
(old_out, old_err) = (sys.stdo... | @contextmanager
def captured_output():
'\n Reassign stdout temporarily in order to test printed statements\n Taken from: https://stackoverflow.com/questions/4219717/how-to-assert-output-with-nosetest-unittest-in-python\n '
(new_out, new_err) = (StringIO(), StringIO())
(old_out, old_err) = (sys.stdo... |
cb993120c1eab11409fe5f69331ce87ffcad4523c7f1d0b80189e6c861cbd13d | @classmethod
def build_corrected(cls, old: Classifier, p0: Perception, p1: Perception) -> Classifier:
'\n Constructs the classifier for "correctable case".\n C_new and E_new will be different from the old classifier in the\n non-matching components of p0 and p1.\n\n There\n - E_ne... | Constructs the classifier for "correctable case".
C_new and E_new will be different from the old classifier in the
non-matching components of p0 and p1.
There
- E_new will be equal to p1
- C_new will be equal to p0
respectively.
Parameters
----------
old: Classifier
Old classifier that will be cloned and changed
... | lcs/agents/acs/Classifier.py | build_corrected | khozzy/ACS2 | 11 | python | @classmethod
def build_corrected(cls, old: Classifier, p0: Perception, p1: Perception) -> Classifier:
'\n Constructs the classifier for "correctable case".\n C_new and E_new will be different from the old classifier in the\n non-matching components of p0 and p1.\n\n There\n - E_ne... | @classmethod
def build_corrected(cls, old: Classifier, p0: Perception, p1: Perception) -> Classifier:
'\n Constructs the classifier for "correctable case".\n C_new and E_new will be different from the old classifier in the\n non-matching components of p0 and p1.\n\n There\n - E_ne... |
eaf514cf607d2a3821cc90c0a3b31ccf0da033217359fb114502b7667e1a7cbc | @property
def specified_unchanging_attributes(self) -> List[int]:
'\n Determines the specified unchanging attributes in the classifier.\n An unchanging attribute is one that is anticipated not to change\n in the effect part.\n\n Returns\n -------\n List[int]\n li... | Determines the specified unchanging attributes in the classifier.
An unchanging attribute is one that is anticipated not to change
in the effect part.
Returns
-------
List[int]
list of specified unchanging attributes indices | lcs/agents/acs/Classifier.py | specified_unchanging_attributes | khozzy/ACS2 | 11 | python | @property
def specified_unchanging_attributes(self) -> List[int]:
'\n Determines the specified unchanging attributes in the classifier.\n An unchanging attribute is one that is anticipated not to change\n in the effect part.\n\n Returns\n -------\n List[int]\n li... | @property
def specified_unchanging_attributes(self) -> List[int]:
'\n Determines the specified unchanging attributes in the classifier.\n An unchanging attribute is one that is anticipated not to change\n in the effect part.\n\n Returns\n -------\n List[int]\n li... |
81e4a93489f0aea47744f26f77811ebe6be47b01dc15904136c1c133a0ae9bda | def does_anticipate_change(self) -> bool:
'\n Checks whether any change in environment is anticipated\n\n Returns\n -------\n bool\n true if the effect part contains any specified attributes\n '
return self.effect.specify_change | Checks whether any change in environment is anticipated
Returns
-------
bool
true if the effect part contains any specified attributes | lcs/agents/acs/Classifier.py | does_anticipate_change | khozzy/ACS2 | 11 | python | def does_anticipate_change(self) -> bool:
'\n Checks whether any change in environment is anticipated\n\n Returns\n -------\n bool\n true if the effect part contains any specified attributes\n '
return self.effect.specify_change | def does_anticipate_change(self) -> bool:
'\n Checks whether any change in environment is anticipated\n\n Returns\n -------\n bool\n true if the effect part contains any specified attributes\n '
return self.effect.specify_change<|docstring|>Checks whether any change... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.