repository_name
stringlengths
7
55
func_path_in_repository
stringlengths
4
223
func_name
stringlengths
1
134
whole_func_string
stringlengths
75
104k
language
stringclasses
1 value
func_code_string
stringlengths
75
104k
func_code_tokens
listlengths
19
28.4k
func_documentation_string
stringlengths
1
46.9k
func_documentation_tokens
listlengths
1
1.97k
split_name
stringclasses
1 value
func_code_url
stringlengths
87
315
nion-software/nionswift
nion/swift/model/Connection.py
Connection.persistent_object_context_changed
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def change_registration(registered_object, unregistered_object): if registered_object and registered_object.uuid == self.parent_uuid: self...
python
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def change_registration(registered_object, unregistered_object): if registered_object and registered_object.uuid == self.parent_uuid: self...
[ "def", "persistent_object_context_changed", "(", "self", ")", ":", "super", "(", ")", ".", "persistent_object_context_changed", "(", ")", "def", "change_registration", "(", "registered_object", ",", "unregistered_object", ")", ":", "if", "registered_object", "and", "r...
Override from PersistentObject.
[ "Override", "from", "PersistentObject", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Connection.py#L86-L97
nion-software/nionswift
nion/swift/model/Connection.py
PropertyConnection.persistent_object_context_changed
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def register(): if self.__source is not None and self.__target is not None: assert not self.__binding self.__binding = Bin...
python
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def register(): if self.__source is not None and self.__target is not None: assert not self.__binding self.__binding = Bin...
[ "def", "persistent_object_context_changed", "(", "self", ")", ":", "super", "(", ")", ".", "persistent_object_context_changed", "(", ")", "def", "register", "(", ")", ":", "if", "self", ".", "__source", "is", "not", "None", "and", "self", ".", "__target", "i...
Override from PersistentObject.
[ "Override", "from", "PersistentObject", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Connection.py#L162-L219
nion-software/nionswift
nion/swift/model/Connection.py
IntervalListConnection.persistent_object_context_changed
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def detach(): for listener in self.__interval_mutated_listeners: listener.close() self.__interval_mutated_listeners = list() ...
python
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def detach(): for listener in self.__interval_mutated_listeners: listener.close() self.__interval_mutated_listeners = list() ...
[ "def", "persistent_object_context_changed", "(", "self", ")", ":", "super", "(", ")", ".", "persistent_object_context_changed", "(", ")", "def", "detach", "(", ")", ":", "for", "listener", "in", "self", ".", "__interval_mutated_listeners", ":", "listener", ".", ...
Override from PersistentObject.
[ "Override", "from", "PersistentObject", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Connection.py#L247-L298
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.__display_for_tree_node
def __display_for_tree_node(self, tree_node): """ Return the text display for the given tree node. Based on number of keys associated with tree node. """ keys = tree_node.keys if len(keys) == 1: return "{0} ({1})".format(tree_node.keys[-1], tree_node.count) elif len(keys) == ...
python
def __display_for_tree_node(self, tree_node): """ Return the text display for the given tree node. Based on number of keys associated with tree node. """ keys = tree_node.keys if len(keys) == 1: return "{0} ({1})".format(tree_node.keys[-1], tree_node.count) elif len(keys) == ...
[ "def", "__display_for_tree_node", "(", "self", ",", "tree_node", ")", ":", "keys", "=", "tree_node", ".", "keys", "if", "len", "(", "keys", ")", "==", "1", ":", "return", "\"{0} ({1})\"", ".", "format", "(", "tree_node", ".", "keys", "[", "-", "1", "]"...
Return the text display for the given tree node. Based on number of keys associated with tree node.
[ "Return", "the", "text", "display", "for", "the", "given", "tree", "node", ".", "Based", "on", "number", "of", "keys", "associated", "with", "tree", "node", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L121-L133
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.__insert_child
def __insert_child(self, parent_tree_node, index, tree_node): """ Called from the root tree node when a new node is inserted into tree. This method creates properties to represent the node for display and inserts it into the item model controller. """ # manage the item mo...
python
def __insert_child(self, parent_tree_node, index, tree_node): """ Called from the root tree node when a new node is inserted into tree. This method creates properties to represent the node for display and inserts it into the item model controller. """ # manage the item mo...
[ "def", "__insert_child", "(", "self", ",", "parent_tree_node", ",", "index", ",", "tree_node", ")", ":", "# manage the item model", "parent_item", "=", "self", ".", "__mapping", "[", "id", "(", "parent_tree_node", ")", "]", "self", ".", "item_model_controller", ...
Called from the root tree node when a new node is inserted into tree. This method creates properties to represent the node for display and inserts it into the item model controller.
[ "Called", "from", "the", "root", "tree", "node", "when", "a", "new", "node", "is", "inserted", "into", "tree", ".", "This", "method", "creates", "properties", "to", "represent", "the", "node", "for", "display", "and", "inserts", "it", "into", "the", "item"...
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L135-L150
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.__remove_child
def __remove_child(self, parent_tree_node, index): """ Called from the root tree node when a node is removed from the tree. This method removes it into the item model controller. """ # get parent and item parent_item = self.__mapping[id(parent_tree_node)] ...
python
def __remove_child(self, parent_tree_node, index): """ Called from the root tree node when a node is removed from the tree. This method removes it into the item model controller. """ # get parent and item parent_item = self.__mapping[id(parent_tree_node)] ...
[ "def", "__remove_child", "(", "self", ",", "parent_tree_node", ",", "index", ")", ":", "# get parent and item", "parent_item", "=", "self", ".", "__mapping", "[", "id", "(", "parent_tree_node", ")", "]", "# manage the item model", "self", ".", "item_model_controller...
Called from the root tree node when a node is removed from the tree. This method removes it into the item model controller.
[ "Called", "from", "the", "root", "tree", "node", "when", "a", "node", "is", "removed", "from", "the", "tree", ".", "This", "method", "removes", "it", "into", "the", "item", "model", "controller", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L152-L164
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.update_all_nodes
def update_all_nodes(self): """ Update all tree item displays if needed. Usually for count updates. """ item_model_controller = self.item_model_controller if item_model_controller: if self.__node_counts_dirty: for item in self.__mapping.values(): i...
python
def update_all_nodes(self): """ Update all tree item displays if needed. Usually for count updates. """ item_model_controller = self.item_model_controller if item_model_controller: if self.__node_counts_dirty: for item in self.__mapping.values(): i...
[ "def", "update_all_nodes", "(", "self", ")", ":", "item_model_controller", "=", "self", ".", "item_model_controller", "if", "item_model_controller", ":", "if", "self", ".", "__node_counts_dirty", ":", "for", "item", "in", "self", ".", "__mapping", ".", "values", ...
Update all tree item displays if needed. Usually for count updates.
[ "Update", "all", "tree", "item", "displays", "if", "needed", ".", "Usually", "for", "count", "updates", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L170-L180
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.date_browser_selection_changed
def date_browser_selection_changed(self, selected_indexes): """ Called to handle selection changes in the tree widget. This method should be connected to the on_selection_changed event. This method builds a list of keys represented by all selected items. It then provides dat...
python
def date_browser_selection_changed(self, selected_indexes): """ Called to handle selection changes in the tree widget. This method should be connected to the on_selection_changed event. This method builds a list of keys represented by all selected items. It then provides dat...
[ "def", "date_browser_selection_changed", "(", "self", ",", "selected_indexes", ")", ":", "partial_date_filters", "=", "list", "(", ")", "for", "index", ",", "parent_row", ",", "parent_id", "in", "selected_indexes", ":", "item_model_controller", "=", "self", ".", "...
Called to handle selection changes in the tree widget. This method should be connected to the on_selection_changed event. This method builds a list of keys represented by all selected items. It then provides date_filter to filter data items based on the list of keys. It then sets th...
[ "Called", "to", "handle", "selection", "changes", "in", "the", "tree", "widget", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L182-L205
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.text_filter_changed
def text_filter_changed(self, text): """ Called to handle changes to the text filter. :param text: The text for the filter. """ text = text.strip() if text else None if text is not None: self.__text_filter = ListModel.TextFilter("text_for_filter", te...
python
def text_filter_changed(self, text): """ Called to handle changes to the text filter. :param text: The text for the filter. """ text = text.strip() if text else None if text is not None: self.__text_filter = ListModel.TextFilter("text_for_filter", te...
[ "def", "text_filter_changed", "(", "self", ",", "text", ")", ":", "text", "=", "text", ".", "strip", "(", ")", "if", "text", "else", "None", "if", "text", "is", "not", "None", ":", "self", ".", "__text_filter", "=", "ListModel", ".", "TextFilter", "(",...
Called to handle changes to the text filter. :param text: The text for the filter.
[ "Called", "to", "handle", "changes", "to", "the", "text", "filter", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L207-L220
nion-software/nionswift
nion/swift/FilterPanel.py
FilterController.__update_filter
def __update_filter(self): """ Create a combined filter. Set the resulting filter into the document controller. """ filters = list() if self.__date_filter: filters.append(self.__date_filter) if self.__text_filter: filters.append(self.__text_fil...
python
def __update_filter(self): """ Create a combined filter. Set the resulting filter into the document controller. """ filters = list() if self.__date_filter: filters.append(self.__date_filter) if self.__text_filter: filters.append(self.__text_fil...
[ "def", "__update_filter", "(", "self", ")", ":", "filters", "=", "list", "(", ")", "if", "self", ".", "__date_filter", ":", "filters", ".", "append", "(", "self", ".", "__date_filter", ")", "if", "self", ".", "__text_filter", ":", "filters", ".", "append...
Create a combined filter. Set the resulting filter into the document controller.
[ "Create", "a", "combined", "filter", ".", "Set", "the", "resulting", "filter", "into", "the", "document", "controller", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L222-L231
nion-software/nionswift
nion/swift/FilterPanel.py
TreeNode.__get_keys
def __get_keys(self): """ Return the keys associated with this node by adding its key and then adding parent keys recursively. """ keys = list() tree_node = self while tree_node is not None and tree_node.key is not None: keys.insert(0, tree_node.key) tree_node = t...
python
def __get_keys(self): """ Return the keys associated with this node by adding its key and then adding parent keys recursively. """ keys = list() tree_node = self while tree_node is not None and tree_node.key is not None: keys.insert(0, tree_node.key) tree_node = t...
[ "def", "__get_keys", "(", "self", ")", ":", "keys", "=", "list", "(", ")", "tree_node", "=", "self", "while", "tree_node", "is", "not", "None", "and", "tree_node", ".", "key", "is", "not", "None", ":", "keys", ".", "insert", "(", "0", ",", "tree_node...
Return the keys associated with this node by adding its key and then adding parent keys recursively.
[ "Return", "the", "keys", "associated", "with", "this", "node", "by", "adding", "its", "key", "and", "then", "adding", "parent", "keys", "recursively", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L348-L355
nion-software/nionswift
nion/swift/FilterPanel.py
TreeNode.insert_value
def insert_value(self, keys, value): """ Insert a value (data item) into this tree node and then its children. This will be called in response to a new data item being inserted into the document. Also updates the tree node's cumulative child count. """ ...
python
def insert_value(self, keys, value): """ Insert a value (data item) into this tree node and then its children. This will be called in response to a new data item being inserted into the document. Also updates the tree node's cumulative child count. """ ...
[ "def", "insert_value", "(", "self", ",", "keys", ",", "value", ")", ":", "self", ".", "count", "+=", "1", "if", "not", "self", ".", "key", ":", "self", ".", "__value_reverse_mapping", "[", "value", "]", "=", "keys", "if", "len", "(", "keys", ")", "...
Insert a value (data item) into this tree node and then its children. This will be called in response to a new data item being inserted into the document. Also updates the tree node's cumulative child count.
[ "Insert", "a", "value", "(", "data", "item", ")", "into", "this", "tree", "node", "and", "then", "its", "children", ".", "This", "will", "be", "called", "in", "response", "to", "a", "new", "data", "item", "being", "inserted", "into", "the", "document", ...
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L358-L385
nion-software/nionswift
nion/swift/FilterPanel.py
TreeNode.remove_value
def remove_value(self, keys, value): """ Remove a value (data item) from this tree node and its children. Also updates the tree node's cumulative child count. """ self.count -= 1 if not self.key: keys = self.__value_reverse_mapping[value] d...
python
def remove_value(self, keys, value): """ Remove a value (data item) from this tree node and its children. Also updates the tree node's cumulative child count. """ self.count -= 1 if not self.key: keys = self.__value_reverse_mapping[value] d...
[ "def", "remove_value", "(", "self", ",", "keys", ",", "value", ")", ":", "self", ".", "count", "-=", "1", "if", "not", "self", ".", "key", ":", "keys", "=", "self", ".", "__value_reverse_mapping", "[", "value", "]", "del", "self", ".", "__value_reverse...
Remove a value (data item) from this tree node and its children. Also updates the tree node's cumulative child count.
[ "Remove", "a", "value", "(", "data", "item", ")", "from", "this", "tree", "node", "and", "its", "children", ".", "Also", "updates", "the", "tree", "node", "s", "cumulative", "child", "count", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/FilterPanel.py#L387-L408
djgagne/hagelslag
hagelslag/processing/tracker.py
label_storm_objects
def label_storm_objects(data, method, min_intensity, max_intensity, min_area=1, max_area=100, max_range=1, increment=1, gaussian_sd=0): """ From a 2D grid or time series of 2D grids, this method labels storm objects with either the Enhanced Watershed or Hysteresis methods. Args:...
python
def label_storm_objects(data, method, min_intensity, max_intensity, min_area=1, max_area=100, max_range=1, increment=1, gaussian_sd=0): """ From a 2D grid or time series of 2D grids, this method labels storm objects with either the Enhanced Watershed or Hysteresis methods. Args:...
[ "def", "label_storm_objects", "(", "data", ",", "method", ",", "min_intensity", ",", "max_intensity", ",", "min_area", "=", "1", ",", "max_area", "=", "100", ",", "max_range", "=", "1", ",", "increment", "=", "1", ",", "gaussian_sd", "=", "0", ")", ":", ...
From a 2D grid or time series of 2D grids, this method labels storm objects with either the Enhanced Watershed or Hysteresis methods. Args: data: the gridded data to be labeled. Should be a 2D numpy array in (y, x) coordinate order or a 3D numpy array in (time, y, x) coordinate order ...
[ "From", "a", "2D", "grid", "or", "time", "series", "of", "2D", "grids", "this", "method", "labels", "storm", "objects", "with", "either", "the", "Enhanced", "Watershed", "or", "Hysteresis", "methods", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/tracker.py#L9-L48
djgagne/hagelslag
hagelslag/processing/tracker.py
extract_storm_objects
def extract_storm_objects(label_grid, data, x_grid, y_grid, times, dx=1, dt=1, obj_buffer=0): """ After storms are labeled, this method extracts the storm objects from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about each storm at each timestep....
python
def extract_storm_objects(label_grid, data, x_grid, y_grid, times, dx=1, dt=1, obj_buffer=0): """ After storms are labeled, this method extracts the storm objects from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about each storm at each timestep....
[ "def", "extract_storm_objects", "(", "label_grid", ",", "data", ",", "x_grid", ",", "y_grid", ",", "times", ",", "dx", "=", "1", ",", "dt", "=", "1", ",", "obj_buffer", "=", "0", ")", ":", "storm_objects", "=", "[", "]", "if", "len", "(", "label_grid...
After storms are labeled, this method extracts the storm objects from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about each storm at each timestep. Args: label_grid: 2D or 3D array output by label_storm_objects. data: 2D or 3D array...
[ "After", "storms", "are", "labeled", "this", "method", "extracts", "the", "storm", "objects", "from", "the", "grid", "and", "places", "them", "into", "STObjects", ".", "The", "STObjects", "contain", "intensity", "location", "and", "shape", "information", "about"...
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/tracker.py#L51-L118
djgagne/hagelslag
hagelslag/processing/tracker.py
extract_storm_patches
def extract_storm_patches(label_grid, data, x_grid, y_grid, times, dx=1, dt=1, patch_radius=16): """ After storms are labeled, this method extracts boxes of equal size centered on each storm from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about ...
python
def extract_storm_patches(label_grid, data, x_grid, y_grid, times, dx=1, dt=1, patch_radius=16): """ After storms are labeled, this method extracts boxes of equal size centered on each storm from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about ...
[ "def", "extract_storm_patches", "(", "label_grid", ",", "data", ",", "x_grid", ",", "y_grid", ",", "times", ",", "dx", "=", "1", ",", "dt", "=", "1", ",", "patch_radius", "=", "16", ")", ":", "storm_objects", "=", "[", "]", "if", "len", "(", "label_g...
After storms are labeled, this method extracts boxes of equal size centered on each storm from the grid and places them into STObjects. The STObjects contain intensity, location, and shape information about each storm at each timestep. Args: label_grid: 2D or 3D array output by label_storm_objects....
[ "After", "storms", "are", "labeled", "this", "method", "extracts", "boxes", "of", "equal", "size", "centered", "on", "each", "storm", "from", "the", "grid", "and", "places", "them", "into", "STObjects", ".", "The", "STObjects", "contain", "intensity", "locatio...
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/tracker.py#L121-L185
djgagne/hagelslag
hagelslag/processing/tracker.py
track_storms
def track_storms(storm_objects, times, distance_components, distance_maxima, distance_weights, tracked_objects=None): """ Given the output of extract_storm_objects, this method tracks storms through time and merges individual STObjects into a set of tracks. Args: storm_objects: list of list of ...
python
def track_storms(storm_objects, times, distance_components, distance_maxima, distance_weights, tracked_objects=None): """ Given the output of extract_storm_objects, this method tracks storms through time and merges individual STObjects into a set of tracks. Args: storm_objects: list of list of ...
[ "def", "track_storms", "(", "storm_objects", ",", "times", ",", "distance_components", ",", "distance_maxima", ",", "distance_weights", ",", "tracked_objects", "=", "None", ")", ":", "obj_matcher", "=", "ObjectMatcher", "(", "distance_components", ",", "distance_weigh...
Given the output of extract_storm_objects, this method tracks storms through time and merges individual STObjects into a set of tracks. Args: storm_objects: list of list of STObjects that have not been tracked. times: List of times associated with each set of STObjects distance_componen...
[ "Given", "the", "output", "of", "extract_storm_objects", "this", "method", "tracks", "storms", "through", "time", "and", "merges", "individual", "STObjects", "into", "a", "set", "of", "tracks", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/tracker.py#L188-L222
djgagne/hagelslag
hagelslag/evaluation/MulticlassContingencyTable.py
MulticlassContingencyTable.peirce_skill_score
def peirce_skill_score(self): """ Multiclass Peirce Skill Score (also Hanssen and Kuipers score, True Skill Score) """ n = float(self.table.sum()) nf = self.table.sum(axis=1) no = self.table.sum(axis=0) correct = float(self.table.trace()) return (correct /...
python
def peirce_skill_score(self): """ Multiclass Peirce Skill Score (also Hanssen and Kuipers score, True Skill Score) """ n = float(self.table.sum()) nf = self.table.sum(axis=1) no = self.table.sum(axis=0) correct = float(self.table.trace()) return (correct /...
[ "def", "peirce_skill_score", "(", "self", ")", ":", "n", "=", "float", "(", "self", ".", "table", ".", "sum", "(", ")", ")", "nf", "=", "self", ".", "table", ".", "sum", "(", "axis", "=", "1", ")", "no", "=", "self", ".", "table", ".", "sum", ...
Multiclass Peirce Skill Score (also Hanssen and Kuipers score, True Skill Score)
[ "Multiclass", "Peirce", "Skill", "Score", "(", "also", "Hanssen", "and", "Kuipers", "score", "True", "Skill", "Score", ")" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/evaluation/MulticlassContingencyTable.py#L35-L43
djgagne/hagelslag
hagelslag/evaluation/MulticlassContingencyTable.py
MulticlassContingencyTable.gerrity_score
def gerrity_score(self): """ Gerrity Score, which weights each cell in the contingency table by its observed relative frequency. :return: """ k = self.table.shape[0] n = float(self.table.sum()) p_o = self.table.sum(axis=0) / n p_sum = np.cumsum(p_o)[:-1] ...
python
def gerrity_score(self): """ Gerrity Score, which weights each cell in the contingency table by its observed relative frequency. :return: """ k = self.table.shape[0] n = float(self.table.sum()) p_o = self.table.sum(axis=0) / n p_sum = np.cumsum(p_o)[:-1] ...
[ "def", "gerrity_score", "(", "self", ")", ":", "k", "=", "self", ".", "table", ".", "shape", "[", "0", "]", "n", "=", "float", "(", "self", ".", "table", ".", "sum", "(", ")", ")", "p_o", "=", "self", ".", "table", ".", "sum", "(", "axis", "=...
Gerrity Score, which weights each cell in the contingency table by its observed relative frequency. :return:
[ "Gerrity", "Score", "which", "weights", "each", "cell", "in", "the", "contingency", "table", "by", "its", "observed", "relative", "frequency", ".", ":", "return", ":" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/evaluation/MulticlassContingencyTable.py#L45-L63
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
centroid_distance
def centroid_distance(item_a, time_a, item_b, time_b, max_value): """ Euclidean distance between the centroids of item_a and item_b. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher ...
python
def centroid_distance(item_a, time_a, item_b, time_b, max_value): """ Euclidean distance between the centroids of item_a and item_b. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher ...
[ "def", "centroid_distance", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "ax", ",", "ay", "=", "item_a", ".", "center_of_mass", "(", "time_a", ")", "bx", ",", "by", "=", "item_b", ".", "center_of_mass", "(", "...
Euclidean distance between the centroids of item_a and item_b. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value: Maximum distan...
[ "Euclidean", "distance", "between", "the", "centroids", "of", "item_a", "and", "item_b", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L246-L262
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
shifted_centroid_distance
def shifted_centroid_distance(item_a, time_a, item_b, time_b, max_value): """ Centroid distance with motion corrections. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time...
python
def shifted_centroid_distance(item_a, time_a, item_b, time_b, max_value): """ Centroid distance with motion corrections. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time...
[ "def", "shifted_centroid_distance", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "ax", ",", "ay", "=", "item_a", ".", "center_of_mass", "(", "time_a", ")", "bx", ",", "by", "=", "item_b", ".", "center_of_mass", ...
Centroid distance with motion corrections. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value: Maximum distance value used as sca...
[ "Centroid", "distance", "with", "motion", "corrections", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L269-L291
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
closest_distance
def closest_distance(item_a, time_a, item_b, time_b, max_value): """ Euclidean distance between the pixels in item_a and item_b closest to each other. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set...
python
def closest_distance(item_a, time_a, item_b, time_b, max_value): """ Euclidean distance between the pixels in item_a and item_b closest to each other. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set...
[ "def", "closest_distance", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "return", "np", ".", "minimum", "(", "item_a", ".", "closest_distance", "(", "time_a", ",", "item_b", ",", "time_b", ")", ",", "max_value", ...
Euclidean distance between the pixels in item_a and item_b closest to each other. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_va...
[ "Euclidean", "distance", "between", "the", "pixels", "in", "item_a", "and", "item_b", "closest", "to", "each", "other", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L294-L308
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
ellipse_distance
def ellipse_distance(item_a, time_a, item_b, time_b, max_value): """ Calculate differences in the properties of ellipses fitted to each object. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in Obj...
python
def ellipse_distance(item_a, time_a, item_b, time_b, max_value): """ Calculate differences in the properties of ellipses fitted to each object. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in Obj...
[ "def", "ellipse_distance", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "ts", "=", "np", ".", "array", "(", "[", "0", ",", "np", ".", "pi", "]", ")", "ell_a", "=", "item_a", ".", "get_ellipse_model", "(", ...
Calculate differences in the properties of ellipses fitted to each object. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value: Ma...
[ "Calculate", "differences", "in", "the", "properties", "of", "ellipses", "fitted", "to", "each", "object", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L311-L331
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
nonoverlap
def nonoverlap(item_a, time_a, item_b, time_b, max_value): """ Percentage of pixels in each object that do not overlap with the other object Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in Object...
python
def nonoverlap(item_a, time_a, item_b, time_b, max_value): """ Percentage of pixels in each object that do not overlap with the other object Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in Object...
[ "def", "nonoverlap", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "return", "np", ".", "minimum", "(", "1", "-", "item_a", ".", "count_overlap", "(", "time_a", ",", "item_b", ",", "time_b", ")", ",", "max_valu...
Percentage of pixels in each object that do not overlap with the other object Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value:...
[ "Percentage", "of", "pixels", "in", "each", "object", "that", "do", "not", "overlap", "with", "the", "other", "object" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L334-L348
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
max_intensity
def max_intensity(item_a, time_a, item_b, time_b, max_value): """ RMS difference in maximum intensity Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer be...
python
def max_intensity(item_a, time_a, item_b, time_b, max_value): """ RMS difference in maximum intensity Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer be...
[ "def", "max_intensity", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "intensity_a", "=", "item_a", ".", "max_intensity", "(", "time_a", ")", "intensity_b", "=", "item_b", ".", "max_intensity", "(", "time_b", ")", ...
RMS difference in maximum intensity Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value: Maximum distance value used as scaling va...
[ "RMS", "difference", "in", "maximum", "intensity" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L351-L368
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
area_difference
def area_difference(item_a, time_a, item_b, time_b, max_value): """ RMS Difference in object areas. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer bein...
python
def area_difference(item_a, time_a, item_b, time_b, max_value): """ RMS Difference in object areas. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer bein...
[ "def", "area_difference", "(", "item_a", ",", "time_a", ",", "item_b", ",", "time_b", ",", "max_value", ")", ":", "size_a", "=", "item_a", ".", "size", "(", "time_a", ")", "size_b", "=", "item_b", ".", "size", "(", "time_b", ")", "diff", "=", "np", "...
RMS Difference in object areas. Args: item_a: STObject from the first set in ObjectMatcher time_a: Time integer being evaluated item_b: STObject from the second set in ObjectMatcher time_b: Time integer being evaluated max_value: Maximum distance value used as scaling value ...
[ "RMS", "Difference", "in", "object", "areas", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L371-L388
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
mean_minimum_centroid_distance
def mean_minimum_centroid_distance(item_a, item_b, max_value): """ RMS difference in the minimum distances from the centroids of one track to the centroids of another track Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher ...
python
def mean_minimum_centroid_distance(item_a, item_b, max_value): """ RMS difference in the minimum distances from the centroids of one track to the centroids of another track Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher ...
[ "def", "mean_minimum_centroid_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "centroids_a", "=", "np", ".", "array", "(", "[", "item_a", ".", "center_of_mass", "(", "t", ")", "for", "t", "in", "item_a", ".", "times", "]", ")", "cent...
RMS difference in the minimum distances from the centroids of one track to the centroids of another track Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constrai...
[ "RMS", "difference", "in", "the", "minimum", "distances", "from", "the", "centroids", "of", "one", "track", "to", "the", "centroids", "of", "another", "track" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L391-L407
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
mean_min_time_distance
def mean_min_time_distance(item_a, item_b, max_value): """ Calculate the mean time difference among the time steps in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as...
python
def mean_min_time_distance(item_a, item_b, max_value): """ Calculate the mean time difference among the time steps in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as...
[ "def", "mean_min_time_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "times_a", "=", "item_a", ".", "times", ".", "reshape", "(", "(", "item_a", ".", "times", ".", "size", ",", "1", ")", ")", "times_b", "=", "item_b", ".", "times"...
Calculate the mean time difference among the time steps in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance...
[ "Calculate", "the", "mean", "time", "difference", "among", "the", "time", "steps", "in", "each", "object", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L410-L426
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
start_centroid_distance
def start_centroid_distance(item_a, item_b, max_value): """ Distance between the centroids of the first step in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scali...
python
def start_centroid_distance(item_a, item_b, max_value): """ Distance between the centroids of the first step in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scali...
[ "def", "start_centroid_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "start_a", "=", "item_a", ".", "center_of_mass", "(", "item_a", ".", "times", "[", "0", "]", ")", "start_b", "=", "item_b", ".", "center_of_mass", "(", "item_b", "....
Distance between the centroids of the first step in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance value ...
[ "Distance", "between", "the", "centroids", "of", "the", "first", "step", "in", "each", "object", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L429-L444
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
start_time_distance
def start_time_distance(item_a, item_b, max_value): """ Absolute difference between the starting times of each item. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value...
python
def start_time_distance(item_a, item_b, max_value): """ Absolute difference between the starting times of each item. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value...
[ "def", "start_time_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "start_time_diff", "=", "np", ".", "abs", "(", "item_a", ".", "times", "[", "0", "]", "-", "item_b", ".", "times", "[", "0", "]", ")", "return", "np", ".", "minim...
Absolute difference between the starting times of each item. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance value betw...
[ "Absolute", "difference", "between", "the", "starting", "times", "of", "each", "item", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L447-L460
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
duration_distance
def duration_distance(item_a, item_b, max_value): """ Absolute difference in the duration of two items Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper con...
python
def duration_distance(item_a, item_b, max_value): """ Absolute difference in the duration of two items Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper con...
[ "def", "duration_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "duration_a", "=", "item_a", ".", "times", ".", "size", "duration_b", "=", "item_b", ".", "times", ".", "size", "return", "np", ".", "minimum", "(", "np", ".", "abs", ...
Absolute difference in the duration of two items Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance value between 0 and 1.
[ "Absolute", "difference", "in", "the", "duration", "of", "two", "items" ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L463-L477
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
mean_area_distance
def mean_area_distance(item_a, item_b, max_value): """ Absolute difference in the means of the areas of each track over time. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scal...
python
def mean_area_distance(item_a, item_b, max_value): """ Absolute difference in the means of the areas of each track over time. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scal...
[ "def", "mean_area_distance", "(", "item_a", ",", "item_b", ",", "max_value", ")", ":", "mean_area_a", "=", "np", ".", "mean", "(", "[", "item_a", ".", "size", "(", "t", ")", "for", "t", "in", "item_a", ".", "times", "]", ")", "mean_area_b", "=", "np"...
Absolute difference in the means of the areas of each track over time. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance ...
[ "Absolute", "difference", "in", "the", "means", "of", "the", "areas", "of", "each", "track", "over", "time", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L480-L494
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
ObjectMatcher.match_objects
def match_objects(self, set_a, set_b, time_a, time_b): """ Match two sets of objects at particular times. Args: set_a: list of STObjects set_b: list of STObjects time_a: time at which set_a is being evaluated for matching time_b: time at which set...
python
def match_objects(self, set_a, set_b, time_a, time_b): """ Match two sets of objects at particular times. Args: set_a: list of STObjects set_b: list of STObjects time_a: time at which set_a is being evaluated for matching time_b: time at which set...
[ "def", "match_objects", "(", "self", ",", "set_a", ",", "set_b", ",", "time_a", ",", "time_b", ")", ":", "costs", "=", "self", ".", "cost_matrix", "(", "set_a", ",", "set_b", ",", "time_a", ",", "time_b", ")", "*", "100", "min_row_costs", "=", "costs",...
Match two sets of objects at particular times. Args: set_a: list of STObjects set_b: list of STObjects time_a: time at which set_a is being evaluated for matching time_b: time at which set_b is being evaluated for matching Returns: List of tu...
[ "Match", "two", "sets", "of", "objects", "at", "particular", "times", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L27-L53
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
ObjectMatcher.cost_matrix
def cost_matrix(self, set_a, set_b, time_a, time_b): """ Calculates the costs (distances) between the items in set a and set b at the specified times. Args: set_a: List of STObjects set_b: List of STObjects time_a: time at which objects in set_a are evaluated...
python
def cost_matrix(self, set_a, set_b, time_a, time_b): """ Calculates the costs (distances) between the items in set a and set b at the specified times. Args: set_a: List of STObjects set_b: List of STObjects time_a: time at which objects in set_a are evaluated...
[ "def", "cost_matrix", "(", "self", ",", "set_a", ",", "set_b", ",", "time_a", ",", "time_b", ")", ":", "costs", "=", "np", ".", "zeros", "(", "(", "len", "(", "set_a", ")", ",", "len", "(", "set_b", ")", ")", ")", "for", "a", ",", "item_a", "in...
Calculates the costs (distances) between the items in set a and set b at the specified times. Args: set_a: List of STObjects set_b: List of STObjects time_a: time at which objects in set_a are evaluated time_b: time at whcih object in set_b are evaluated ...
[ "Calculates", "the", "costs", "(", "distances", ")", "between", "the", "items", "in", "set", "a", "and", "set", "b", "at", "the", "specified", "times", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L55-L73
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
ObjectMatcher.total_cost_function
def total_cost_function(self, item_a, item_b, time_a, time_b): """ Calculate total cost function between two items. Args: item_a: STObject item_b: STObject time_a: Timestep in item_a at which cost function is evaluated time_b: Timestep in item_b a...
python
def total_cost_function(self, item_a, item_b, time_a, time_b): """ Calculate total cost function between two items. Args: item_a: STObject item_b: STObject time_a: Timestep in item_a at which cost function is evaluated time_b: Timestep in item_b a...
[ "def", "total_cost_function", "(", "self", ",", "item_a", ",", "item_b", ",", "time_a", ",", "time_b", ")", ":", "distances", "=", "np", ".", "zeros", "(", "len", "(", "self", ".", "weights", ")", ")", "for", "c", ",", "component", "in", "enumerate", ...
Calculate total cost function between two items. Args: item_a: STObject item_b: STObject time_a: Timestep in item_a at which cost function is evaluated time_b: Timestep in item_b at which cost function is evaluated Returns: The total weighted...
[ "Calculate", "total", "cost", "function", "between", "two", "items", "." ]
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L75-L92
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
TrackMatcher.match_tracks
def match_tracks(self, set_a, set_b, closest_matches=False): """ Find the optimal set of matching assignments between set a and set b. This function supports optimal 1:1 matching using the Munkres method and matching from every object in set a to the closest object in set b. In this situ...
python
def match_tracks(self, set_a, set_b, closest_matches=False): """ Find the optimal set of matching assignments between set a and set b. This function supports optimal 1:1 matching using the Munkres method and matching from every object in set a to the closest object in set b. In this situ...
[ "def", "match_tracks", "(", "self", ",", "set_a", ",", "set_b", ",", "closest_matches", "=", "False", ")", ":", "costs", "=", "self", ".", "track_cost_matrix", "(", "set_a", ",", "set_b", ")", "*", "100", "min_row_costs", "=", "costs", ".", "min", "(", ...
Find the optimal set of matching assignments between set a and set b. This function supports optimal 1:1 matching using the Munkres method and matching from every object in set a to the closest object in set b. In this situation set b accepts multiple matches from set a. Args: set_a...
[ "Find", "the", "optimal", "set", "of", "matching", "assignments", "between", "set", "a", "and", "set", "b", ".", "This", "function", "supports", "optimal", "1", ":", "1", "matching", "using", "the", "Munkres", "method", "and", "matching", "from", "every", ...
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L112-L145
djgagne/hagelslag
hagelslag/processing/ObjectMatcher.py
TrackStepMatcher.match
def match(self, set_a, set_b): """ For each step in each track from set_a, identify all steps in all tracks from set_b that meet all cost function criteria Args: set_a: List of STObjects set_b: List of STObjects Returns: track_pairing...
python
def match(self, set_a, set_b): """ For each step in each track from set_a, identify all steps in all tracks from set_b that meet all cost function criteria Args: set_a: List of STObjects set_b: List of STObjects Returns: track_pairing...
[ "def", "match", "(", "self", ",", "set_a", ",", "set_b", ")", ":", "track_step_matches", "=", "[", "[", "]", "*", "len", "(", "set_a", ")", "]", "costs", "=", "self", ".", "cost_matrix", "(", "set_a", ",", "set_b", ")", "valid_costs", "=", "np", "....
For each step in each track from set_a, identify all steps in all tracks from set_b that meet all cost function criteria Args: set_a: List of STObjects set_b: List of STObjects Returns: track_pairings: pandas.DataFrame
[ "For", "each", "step", "in", "each", "track", "from", "set_a", "identify", "all", "steps", "in", "all", "tracks", "from", "set_b", "that", "meet", "all", "cost", "function", "criteria", "Args", ":", "set_a", ":", "List", "of", "STObjects", "set_b", ":", ...
train
https://github.com/djgagne/hagelslag/blob/6fb6c3df90bf4867e13a97d3460b14471d107df1/hagelslag/processing/ObjectMatcher.py#L190-L224
nion-software/nionswift
nion/swift/model/Symbolic.py
ComputationVariable.variable_specifier
def variable_specifier(self) -> dict: """Return the variable specifier for this variable. The specifier can be used to lookup the value of this variable in a computation context. """ if self.value_type is not None: return {"type": "variable", "version": 1, "uuid": str(self.u...
python
def variable_specifier(self) -> dict: """Return the variable specifier for this variable. The specifier can be used to lookup the value of this variable in a computation context. """ if self.value_type is not None: return {"type": "variable", "version": 1, "uuid": str(self.u...
[ "def", "variable_specifier", "(", "self", ")", "->", "dict", ":", "if", "self", ".", "value_type", "is", "not", "None", ":", "return", "{", "\"type\"", ":", "\"variable\"", ",", "\"version\"", ":", "1", ",", "\"uuid\"", ":", "str", "(", "self", ".", "u...
Return the variable specifier for this variable. The specifier can be used to lookup the value of this variable in a computation context.
[ "Return", "the", "variable", "specifier", "for", "this", "variable", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L228-L236
nion-software/nionswift
nion/swift/model/Symbolic.py
ComputationVariable.bound_variable
def bound_variable(self): """Return an object with a value property and a changed_event. The value property returns the value of the variable. The changed_event is fired whenever the value changes. """ class BoundVariable: def __init__(self, variable): ...
python
def bound_variable(self): """Return an object with a value property and a changed_event. The value property returns the value of the variable. The changed_event is fired whenever the value changes. """ class BoundVariable: def __init__(self, variable): ...
[ "def", "bound_variable", "(", "self", ")", ":", "class", "BoundVariable", ":", "def", "__init__", "(", "self", ",", "variable", ")", ":", "self", ".", "__variable", "=", "variable", "self", ".", "changed_event", "=", "Event", ".", "Event", "(", ")", "sel...
Return an object with a value property and a changed_event. The value property returns the value of the variable. The changed_event is fired whenever the value changes.
[ "Return", "an", "object", "with", "a", "value", "property", "and", "a", "changed_event", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L239-L261
nion-software/nionswift
nion/swift/model/Symbolic.py
ComputationContext.resolve_object_specifier
def resolve_object_specifier(self, object_specifier, secondary_specifier=None, property_name=None, objects_model=None): """Resolve the object specifier. First lookup the object specifier in the enclosing computation. If it's not found, then lookup in the computation's context. Otherwise it shou...
python
def resolve_object_specifier(self, object_specifier, secondary_specifier=None, property_name=None, objects_model=None): """Resolve the object specifier. First lookup the object specifier in the enclosing computation. If it's not found, then lookup in the computation's context. Otherwise it shou...
[ "def", "resolve_object_specifier", "(", "self", ",", "object_specifier", ",", "secondary_specifier", "=", "None", ",", "property_name", "=", "None", ",", "objects_model", "=", "None", ")", ":", "variable", "=", "self", ".", "__computation", "(", ")", ".", "res...
Resolve the object specifier. First lookup the object specifier in the enclosing computation. If it's not found, then lookup in the computation's context. Otherwise it should be a value type variable. In that case, return the bound variable.
[ "Resolve", "the", "object", "specifier", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L435-L447
nion-software/nionswift
nion/swift/model/Symbolic.py
Computation.parse_names
def parse_names(cls, expression): """Return the list of identifiers used in the expression.""" names = set() try: ast_node = ast.parse(expression, "ast") class Visitor(ast.NodeVisitor): def visit_Name(self, node): names.add(node.id) ...
python
def parse_names(cls, expression): """Return the list of identifiers used in the expression.""" names = set() try: ast_node = ast.parse(expression, "ast") class Visitor(ast.NodeVisitor): def visit_Name(self, node): names.add(node.id) ...
[ "def", "parse_names", "(", "cls", ",", "expression", ")", ":", "names", "=", "set", "(", ")", "try", ":", "ast_node", "=", "ast", ".", "parse", "(", "expression", ",", "\"ast\"", ")", "class", "Visitor", "(", "ast", ".", "NodeVisitor", ")", ":", "def...
Return the list of identifiers used in the expression.
[ "Return", "the", "list", "of", "identifiers", "used", "in", "the", "expression", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L686-L699
nion-software/nionswift
nion/swift/model/Symbolic.py
Computation.bind
def bind(self, context) -> None: """Bind a context to this computation. The context allows the computation to convert object specifiers to actual objects. """ # make a computation context based on the enclosing context. self.__computation_context = ComputationContext(self, cont...
python
def bind(self, context) -> None: """Bind a context to this computation. The context allows the computation to convert object specifiers to actual objects. """ # make a computation context based on the enclosing context. self.__computation_context = ComputationContext(self, cont...
[ "def", "bind", "(", "self", ",", "context", ")", "->", "None", ":", "# make a computation context based on the enclosing context.", "self", ".", "__computation_context", "=", "ComputationContext", "(", "self", ",", "context", ")", "# re-bind is not valid. be careful to set ...
Bind a context to this computation. The context allows the computation to convert object specifiers to actual objects.
[ "Bind", "a", "context", "to", "this", "computation", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L863-L884
nion-software/nionswift
nion/swift/model/Symbolic.py
Computation.unbind
def unbind(self): """Unlisten and close each bound item.""" for variable in self.variables: self.__unbind_variable(variable) for result in self.results: self.__unbind_result(result)
python
def unbind(self): """Unlisten and close each bound item.""" for variable in self.variables: self.__unbind_variable(variable) for result in self.results: self.__unbind_result(result)
[ "def", "unbind", "(", "self", ")", ":", "for", "variable", "in", "self", ".", "variables", ":", "self", ".", "__unbind_variable", "(", "variable", ")", "for", "result", "in", "self", ".", "results", ":", "self", ".", "__unbind_result", "(", "result", ")"...
Unlisten and close each bound item.
[ "Unlisten", "and", "close", "each", "bound", "item", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/Symbolic.py#L886-L891
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.ativar_sat
def ativar_sat(self, tipo_certificado, cnpj, codigo_uf): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especilizada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT """ retorno = super(ClienteSATLocal, self).ativar_sat( ...
python
def ativar_sat(self, tipo_certificado, cnpj, codigo_uf): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especilizada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT """ retorno = super(ClienteSATLocal, self).ativar_sat( ...
[ "def", "ativar_sat", "(", "self", ",", "tipo_certificado", ",", "cnpj", ",", "codigo_uf", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "ativar_sat", "(", "tipo_certificado", ",", "cnpj", ",", "codigo_uf", ")", "return", ...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especilizada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "ativar_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L46-L54
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.comunicar_certificado_icpbrasil
def comunicar_certificado_icpbrasil(self, certificado): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ comunica...
python
def comunicar_certificado_icpbrasil(self, certificado): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ comunica...
[ "def", "comunicar_certificado_icpbrasil", "(", "self", ",", "certificado", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "comunicar_certificado_icpbrasil", "(", "certificado", ")", "return", "RespostaSAT", ".", "comunicar_certificad...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "comunicar_certificado_icpbrasil", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L57-L65
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.enviar_dados_venda
def enviar_dados_venda(self, dados_venda): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda """ retorno = super(ClienteSATLocal, self...
python
def enviar_dados_venda(self, dados_venda): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda """ retorno = super(ClienteSATLocal, self...
[ "def", "enviar_dados_venda", "(", "self", ",", "dados_venda", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "enviar_dados_venda", "(", "dados_venda", ")", "return", "RespostaEnviarDadosVenda", ".", "analisar", "(", "retorno", ...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "enviar_dados_venda", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L68-L75
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.cancelar_ultima_venda
def cancelar_ultima_venda(self, chave_cfe, dados_cancelamento): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda """ reto...
python
def cancelar_ultima_venda(self, chave_cfe, dados_cancelamento): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda """ reto...
[ "def", "cancelar_ultima_venda", "(", "self", ",", "chave_cfe", ",", "dados_cancelamento", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "cancelar_ultima_venda", "(", "chave_cfe", ",", "dados_cancelamento", ")", "return", "Respos...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "cancelar_ultima_venda", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L78-L86
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.consultar_sat
def consultar_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).consultar_sat() return RespostaSAT.consultar_sat(retorno)
python
def consultar_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).consultar_sat() return RespostaSAT.consultar_sat(retorno)
[ "def", "consultar_sat", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "consultar_sat", "(", ")", "return", "RespostaSAT", ".", "consultar_sat", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L89-L96
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.consultar_status_operacional
def consultar_status_operacional(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional """ ...
python
def consultar_status_operacional(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional """ ...
[ "def", "consultar_status_operacional", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "consultar_status_operacional", "(", ")", "return", "RespostaConsultarStatusOperacional", ".", "analisar", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_status_operacional", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L109-L116
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.consultar_numero_sessao
def consultar_numero_sessao(self, numero_sessao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ ...
python
def consultar_numero_sessao(self, numero_sessao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ ...
[ "def", "consultar_numero_sessao", "(", "self", ",", "numero_sessao", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "consultar_numero_sessao", "(", "numero_sessao", ")", "return", "RespostaConsultarNumeroSessao", ".", "analisar", "...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_numero_sessao", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L119-L127
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.configurar_interface_de_rede
def configurar_interface_de_rede(self, configuracao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ configurar_in...
python
def configurar_interface_de_rede(self, configuracao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ configurar_in...
[ "def", "configurar_interface_de_rede", "(", "self", ",", "configuracao", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "configurar_interface_de_rede", "(", "configuracao", ")", "return", "RespostaSAT", ".", "configurar_interface_de_...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "configurar_interface_de_rede", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L130-L138
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.associar_assinatura
def associar_assinatura(self, sequencia_cnpj, assinatura_ac): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ associar_assin...
python
def associar_assinatura(self, sequencia_cnpj, assinatura_ac): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).\ associar_assin...
[ "def", "associar_assinatura", "(", "self", ",", "sequencia_cnpj", ",", "assinatura_ac", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "associar_assinatura", "(", "sequencia_cnpj", ",", "assinatura_ac", ")", "# (!) resposta baseada...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "associar_assinatura", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L141-L150
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.atualizar_software_sat
def atualizar_software_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.atualizar_software_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).atualizar_software_sat() return RespostaSAT.atual...
python
def atualizar_software_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.atualizar_software_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).atualizar_software_sat() return RespostaSAT.atual...
[ "def", "atualizar_software_sat", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "atualizar_software_sat", "(", ")", "return", "RespostaSAT", ".", "atualizar_software_sat", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.atualizar_software_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "atualizar_software_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L153-L160
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.extrair_logs
def extrair_logs(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.extrair_logs`. :return: Uma resposta SAT especializada em ``ExtrairLogs``. :rtype: satcfe.resposta.extrairlogs.RespostaExtrairLogs """ retorno = super(ClienteSATLocal, self).extrair_logs() return Resposta...
python
def extrair_logs(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.extrair_logs`. :return: Uma resposta SAT especializada em ``ExtrairLogs``. :rtype: satcfe.resposta.extrairlogs.RespostaExtrairLogs """ retorno = super(ClienteSATLocal, self).extrair_logs() return Resposta...
[ "def", "extrair_logs", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "extrair_logs", "(", ")", "return", "RespostaExtrairLogs", ".", "analisar", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.extrair_logs`. :return: Uma resposta SAT especializada em ``ExtrairLogs``. :rtype: satcfe.resposta.extrairlogs.RespostaExtrairLogs
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "extrair_logs", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L163-L170
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.bloquear_sat
def bloquear_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.bloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).bloquear_sat() return RespostaSAT.bloquear_sat(retorno)
python
def bloquear_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.bloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).bloquear_sat() return RespostaSAT.bloquear_sat(retorno)
[ "def", "bloquear_sat", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "bloquear_sat", "(", ")", "return", "RespostaSAT", ".", "bloquear_sat", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.bloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "bloquear_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L173-L180
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.desbloquear_sat
def desbloquear_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.desbloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).desbloquear_sat() return RespostaSAT.desbloquear_sat(retorno)
python
def desbloquear_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.desbloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ retorno = super(ClienteSATLocal, self).desbloquear_sat() return RespostaSAT.desbloquear_sat(retorno)
[ "def", "desbloquear_sat", "(", "self", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", "desbloquear_sat", "(", ")", "return", "RespostaSAT", ".", "desbloquear_sat", "(", "retorno", ")" ]
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.desbloquear_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "desbloquear_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L183-L190
base4sistemas/satcfe
satcfe/clientelocal.py
ClienteSATLocal.trocar_codigo_de_ativacao
def trocar_codigo_de_ativacao(self, novo_codigo_ativacao, opcao=constantes.CODIGO_ATIVACAO_REGULAR, codigo_emergencia=None): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.trocar_codigo_de_ativacao`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSA...
python
def trocar_codigo_de_ativacao(self, novo_codigo_ativacao, opcao=constantes.CODIGO_ATIVACAO_REGULAR, codigo_emergencia=None): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.trocar_codigo_de_ativacao`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSA...
[ "def", "trocar_codigo_de_ativacao", "(", "self", ",", "novo_codigo_ativacao", ",", "opcao", "=", "constantes", ".", "CODIGO_ATIVACAO_REGULAR", ",", "codigo_emergencia", "=", "None", ")", ":", "retorno", "=", "super", "(", "ClienteSATLocal", ",", "self", ")", ".", ...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.trocar_codigo_de_ativacao`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "trocar_codigo_de_ativacao", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientelocal.py#L193-L204
base4sistemas/satcfe
satcfe/entidades.py
Entidade.documento
def documento(self, *args, **kwargs): """Resulta no documento XML como string, que pode ou não incluir a declaração XML no início do documento. """ forcar_unicode = kwargs.pop('forcar_unicode', False) incluir_xml_decl = kwargs.pop('incluir_xml_decl', True) doc = ET.tostri...
python
def documento(self, *args, **kwargs): """Resulta no documento XML como string, que pode ou não incluir a declaração XML no início do documento. """ forcar_unicode = kwargs.pop('forcar_unicode', False) incluir_xml_decl = kwargs.pop('incluir_xml_decl', True) doc = ET.tostri...
[ "def", "documento", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "forcar_unicode", "=", "kwargs", ".", "pop", "(", "'forcar_unicode'", ",", "False", ")", "incluir_xml_decl", "=", "kwargs", ".", "pop", "(", "'incluir_xml_decl'", ",", ...
Resulta no documento XML como string, que pode ou não incluir a declaração XML no início do documento.
[ "Resulta", "no", "documento", "XML", "como", "string", "que", "pode", "ou", "não", "incluir", "a", "declaração", "XML", "no", "início", "do", "documento", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/entidades.py#L308-L324
nion-software/nionswift
nion/swift/Application.py
Application.start
def start(self, skip_choose=False, fixed_workspace_dir=None): """ Start the application. Looks for workspace_location persistent string. If it doesn't find it, uses a default workspace location. Then checks to see if that workspace exists. If not and if skip_cho...
python
def start(self, skip_choose=False, fixed_workspace_dir=None): """ Start the application. Looks for workspace_location persistent string. If it doesn't find it, uses a default workspace location. Then checks to see if that workspace exists. If not and if skip_cho...
[ "def", "start", "(", "self", ",", "skip_choose", "=", "False", ",", "fixed_workspace_dir", "=", "None", ")", ":", "logging", ".", "getLogger", "(", "\"migration\"", ")", ".", "setLevel", "(", "logging", ".", "INFO", ")", "if", "fixed_workspace_dir", ":", "...
Start the application. Looks for workspace_location persistent string. If it doesn't find it, uses a default workspace location. Then checks to see if that workspace exists. If not and if skip_choose has not been set to True, asks the user for a workspace location. User...
[ "Start", "the", "application", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/Application.py#L176-L229
nion-software/nionswift
nion/swift/model/DataItem.py
sort_by_date_key
def sort_by_date_key(data_item): """ A sort key to for the created field of a data item. The sort by uuid makes it determinate. """ return data_item.title + str(data_item.uuid) if data_item.is_live else str(), data_item.date_for_sorting, str(data_item.uuid)
python
def sort_by_date_key(data_item): """ A sort key to for the created field of a data item. The sort by uuid makes it determinate. """ return data_item.title + str(data_item.uuid) if data_item.is_live else str(), data_item.date_for_sorting, str(data_item.uuid)
[ "def", "sort_by_date_key", "(", "data_item", ")", ":", "return", "data_item", ".", "title", "+", "str", "(", "data_item", ".", "uuid", ")", "if", "data_item", ".", "is_live", "else", "str", "(", ")", ",", "data_item", ".", "date_for_sorting", ",", "str", ...
A sort key to for the created field of a data item. The sort by uuid makes it determinate.
[ "A", "sort", "key", "to", "for", "the", "created", "field", "of", "a", "data", "item", ".", "The", "sort", "by", "uuid", "makes", "it", "determinate", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DataItem.py#L1148-L1150
nion-software/nionswift
nion/swift/model/DataItem.py
DataItem.snapshot
def snapshot(self): """Return a new library item which is a copy of this one with any dynamic behavior made static.""" data_item = self.__class__() # data format (temporary until moved to buffered data source) data_item.large_format = self.large_format data_item.set_data_and_meta...
python
def snapshot(self): """Return a new library item which is a copy of this one with any dynamic behavior made static.""" data_item = self.__class__() # data format (temporary until moved to buffered data source) data_item.large_format = self.large_format data_item.set_data_and_meta...
[ "def", "snapshot", "(", "self", ")", ":", "data_item", "=", "self", ".", "__class__", "(", ")", "# data format (temporary until moved to buffered data source)", "data_item", ".", "large_format", "=", "self", ".", "large_format", "data_item", ".", "set_data_and_metadata"...
Return a new library item which is a copy of this one with any dynamic behavior made static.
[ "Return", "a", "new", "library", "item", "which", "is", "a", "copy", "of", "this", "one", "with", "any", "dynamic", "behavior", "made", "static", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DataItem.py#L331-L347
nion-software/nionswift
nion/swift/model/DataItem.py
DataItem.set_r_value
def set_r_value(self, r_var: str, *, notify_changed=True) -> None: """Used to signal changes to the ref var, which are kept in document controller. ugh.""" self.r_var = r_var self._description_changed() if notify_changed: # set to False to set the r-value at startup; avoid marking it as...
python
def set_r_value(self, r_var: str, *, notify_changed=True) -> None: """Used to signal changes to the ref var, which are kept in document controller. ugh.""" self.r_var = r_var self._description_changed() if notify_changed: # set to False to set the r-value at startup; avoid marking it as...
[ "def", "set_r_value", "(", "self", ",", "r_var", ":", "str", ",", "*", ",", "notify_changed", "=", "True", ")", "->", "None", ":", "self", ".", "r_var", "=", "r_var", "self", ".", "_description_changed", "(", ")", "if", "notify_changed", ":", "# set to F...
Used to signal changes to the ref var, which are kept in document controller. ugh.
[ "Used", "to", "signal", "changes", "to", "the", "ref", "var", "which", "are", "kept", "in", "document", "controller", ".", "ugh", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DataItem.py#L611-L616
nion-software/nionswift
nion/swift/model/DataItem.py
DataItem.set_data_and_metadata
def set_data_and_metadata(self, data_and_metadata, data_modified=None): """Sets the underlying data and data-metadata to the data_and_metadata. Note: this does not make a copy of the data. """ self.increment_data_ref_count() try: if data_and_metadata: ...
python
def set_data_and_metadata(self, data_and_metadata, data_modified=None): """Sets the underlying data and data-metadata to the data_and_metadata. Note: this does not make a copy of the data. """ self.increment_data_ref_count() try: if data_and_metadata: ...
[ "def", "set_data_and_metadata", "(", "self", ",", "data_and_metadata", ",", "data_modified", "=", "None", ")", ":", "self", ".", "increment_data_ref_count", "(", ")", "try", ":", "if", "data_and_metadata", ":", "data", "=", "data_and_metadata", ".", "data", "dat...
Sets the underlying data and data-metadata to the data_and_metadata. Note: this does not make a copy of the data.
[ "Sets", "the", "underlying", "data", "and", "data", "-", "metadata", "to", "the", "data_and_metadata", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DataItem.py#L1005-L1031
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayDataChannel.color_map_data
def color_map_data(self) -> typing.Optional[numpy.ndarray]: """Return the color map data as a uint8 ndarray with shape (256, 3).""" if self.display_data_shape is None: # is there display data? return None else: return self.__color_map_data if self.__color_map_data is not...
python
def color_map_data(self) -> typing.Optional[numpy.ndarray]: """Return the color map data as a uint8 ndarray with shape (256, 3).""" if self.display_data_shape is None: # is there display data? return None else: return self.__color_map_data if self.__color_map_data is not...
[ "def", "color_map_data", "(", "self", ")", "->", "typing", ".", "Optional", "[", "numpy", ".", "ndarray", "]", ":", "if", "self", ".", "display_data_shape", "is", "None", ":", "# is there display data?", "return", "None", "else", ":", "return", "self", ".", ...
Return the color map data as a uint8 ndarray with shape (256, 3).
[ "Return", "the", "color", "map", "data", "as", "a", "uint8", "ndarray", "with", "shape", "(", "256", "3", ")", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L670-L675
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayDataChannel.get_calculated_display_values
def get_calculated_display_values(self, immediate: bool=False) -> DisplayValues: """Return the display values. Return the current (possibly uncalculated) display values unless 'immediate' is specified. If 'immediate', return the existing (calculated) values if they exist. Using the 'immediate'...
python
def get_calculated_display_values(self, immediate: bool=False) -> DisplayValues: """Return the display values. Return the current (possibly uncalculated) display values unless 'immediate' is specified. If 'immediate', return the existing (calculated) values if they exist. Using the 'immediate'...
[ "def", "get_calculated_display_values", "(", "self", ",", "immediate", ":", "bool", "=", "False", ")", "->", "DisplayValues", ":", "if", "not", "immediate", "or", "not", "self", ".", "__is_master", "or", "not", "self", ".", "__last_display_values", ":", "if", ...
Return the display values. Return the current (possibly uncalculated) display values unless 'immediate' is specified. If 'immediate', return the existing (calculated) values if they exist. Using the 'immediate' values avoids calculation except in cases where the display values haven't already ...
[ "Return", "the", "display", "values", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L718-L736
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayDataChannel.increment_display_ref_count
def increment_display_ref_count(self, amount: int=1): """Increment display reference count to indicate this library item is currently displayed.""" display_ref_count = self.__display_ref_count self.__display_ref_count += amount if display_ref_count == 0: self.__is_master = Tr...
python
def increment_display_ref_count(self, amount: int=1): """Increment display reference count to indicate this library item is currently displayed.""" display_ref_count = self.__display_ref_count self.__display_ref_count += amount if display_ref_count == 0: self.__is_master = Tr...
[ "def", "increment_display_ref_count", "(", "self", ",", "amount", ":", "int", "=", "1", ")", ":", "display_ref_count", "=", "self", ".", "__display_ref_count", "self", ".", "__display_ref_count", "+=", "amount", "if", "display_ref_count", "==", "0", ":", "self",...
Increment display reference count to indicate this library item is currently displayed.
[ "Increment", "display", "reference", "count", "to", "indicate", "this", "library", "item", "is", "currently", "displayed", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L738-L746
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayDataChannel.decrement_display_ref_count
def decrement_display_ref_count(self, amount: int=1): """Decrement display reference count to indicate this library item is no longer displayed.""" assert not self._closed self.__display_ref_count -= amount if self.__display_ref_count == 0: self.__is_master = False if...
python
def decrement_display_ref_count(self, amount: int=1): """Decrement display reference count to indicate this library item is no longer displayed.""" assert not self._closed self.__display_ref_count -= amount if self.__display_ref_count == 0: self.__is_master = False if...
[ "def", "decrement_display_ref_count", "(", "self", ",", "amount", ":", "int", "=", "1", ")", ":", "assert", "not", "self", ".", "_closed", "self", ".", "__display_ref_count", "-=", "amount", "if", "self", ".", "__display_ref_count", "==", "0", ":", "self", ...
Decrement display reference count to indicate this library item is no longer displayed.
[ "Decrement", "display", "reference", "count", "to", "indicate", "this", "library", "item", "is", "no", "longer", "displayed", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L748-L756
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayDataChannel.auto_display_limits
def auto_display_limits(self): """Calculate best display limits and set them.""" display_data_and_metadata = self.get_calculated_display_values(True).display_data_and_metadata data = display_data_and_metadata.data if display_data_and_metadata else None if data is not None: # ...
python
def auto_display_limits(self): """Calculate best display limits and set them.""" display_data_and_metadata = self.get_calculated_display_values(True).display_data_and_metadata data = display_data_and_metadata.data if display_data_and_metadata else None if data is not None: # ...
[ "def", "auto_display_limits", "(", "self", ")", ":", "display_data_and_metadata", "=", "self", ".", "get_calculated_display_values", "(", "True", ")", ".", "display_data_and_metadata", "data", "=", "display_data_and_metadata", ".", "data", "if", "display_data_and_metadata...
Calculate best display limits and set them.
[ "Calculate", "best", "display", "limits", "and", "set", "them", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L766-L776
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.snapshot
def snapshot(self): """Return a new library item which is a copy of this one with any dynamic behavior made static.""" display_item = self.__class__() display_item.display_type = self.display_type # metadata display_item._set_persistent_property_value("title", self._get_persisten...
python
def snapshot(self): """Return a new library item which is a copy of this one with any dynamic behavior made static.""" display_item = self.__class__() display_item.display_type = self.display_type # metadata display_item._set_persistent_property_value("title", self._get_persisten...
[ "def", "snapshot", "(", "self", ")", ":", "display_item", "=", "self", ".", "__class__", "(", ")", "display_item", ".", "display_type", "=", "self", ".", "display_type", "# metadata", "display_item", ".", "_set_persistent_property_value", "(", "\"title\"", ",", ...
Return a new library item which is a copy of this one with any dynamic behavior made static.
[ "Return", "a", "new", "library", "item", "which", "is", "a", "copy", "of", "this", "one", "with", "any", "dynamic", "behavior", "made", "static", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L980-L998
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.increment_display_ref_count
def increment_display_ref_count(self, amount: int=1): """Increment display reference count to indicate this library item is currently displayed.""" display_ref_count = self.__display_ref_count self.__display_ref_count += amount for display_data_channel in self.display_data_channels: ...
python
def increment_display_ref_count(self, amount: int=1): """Increment display reference count to indicate this library item is currently displayed.""" display_ref_count = self.__display_ref_count self.__display_ref_count += amount for display_data_channel in self.display_data_channels: ...
[ "def", "increment_display_ref_count", "(", "self", ",", "amount", ":", "int", "=", "1", ")", ":", "display_ref_count", "=", "self", ".", "__display_ref_count", "self", ".", "__display_ref_count", "+=", "amount", "for", "display_data_channel", "in", "self", ".", ...
Increment display reference count to indicate this library item is currently displayed.
[ "Increment", "display", "reference", "count", "to", "indicate", "this", "library", "item", "is", "currently", "displayed", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L1167-L1172
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.decrement_display_ref_count
def decrement_display_ref_count(self, amount: int=1): """Decrement display reference count to indicate this library item is no longer displayed.""" assert not self._closed self.__display_ref_count -= amount for display_data_channel in self.display_data_channels: display_data_...
python
def decrement_display_ref_count(self, amount: int=1): """Decrement display reference count to indicate this library item is no longer displayed.""" assert not self._closed self.__display_ref_count -= amount for display_data_channel in self.display_data_channels: display_data_...
[ "def", "decrement_display_ref_count", "(", "self", ",", "amount", ":", "int", "=", "1", ")", ":", "assert", "not", "self", ".", "_closed", "self", ".", "__display_ref_count", "-=", "amount", "for", "display_data_channel", "in", "self", ".", "display_data_channel...
Decrement display reference count to indicate this library item is no longer displayed.
[ "Decrement", "display", "reference", "count", "to", "indicate", "this", "library", "item", "is", "no", "longer", "displayed", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L1174-L1179
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.remove_graphic
def remove_graphic(self, graphic: Graphics.Graphic, *, safe: bool=False) -> typing.Optional[typing.Sequence]: """Remove a graphic, but do it through the container, so dependencies can be tracked.""" return self.remove_model_item(self, "graphics", graphic, safe=safe)
python
def remove_graphic(self, graphic: Graphics.Graphic, *, safe: bool=False) -> typing.Optional[typing.Sequence]: """Remove a graphic, but do it through the container, so dependencies can be tracked.""" return self.remove_model_item(self, "graphics", graphic, safe=safe)
[ "def", "remove_graphic", "(", "self", ",", "graphic", ":", "Graphics", ".", "Graphic", ",", "*", ",", "safe", ":", "bool", "=", "False", ")", "->", "typing", ".", "Optional", "[", "typing", ".", "Sequence", "]", ":", "return", "self", ".", "remove_mode...
Remove a graphic, but do it through the container, so dependencies can be tracked.
[ "Remove", "a", "graphic", "but", "do", "it", "through", "the", "container", "so", "dependencies", "can", "be", "tracked", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L1446-L1448
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.dimensional_shape
def dimensional_shape(self) -> typing.Optional[typing.Tuple[int, ...]]: """Shape of the underlying data, if only one.""" if not self.__data_and_metadata: return None return self.__data_and_metadata.dimensional_shape
python
def dimensional_shape(self) -> typing.Optional[typing.Tuple[int, ...]]: """Shape of the underlying data, if only one.""" if not self.__data_and_metadata: return None return self.__data_and_metadata.dimensional_shape
[ "def", "dimensional_shape", "(", "self", ")", "->", "typing", ".", "Optional", "[", "typing", ".", "Tuple", "[", "int", ",", "...", "]", "]", ":", "if", "not", "self", ".", "__data_and_metadata", ":", "return", "None", "return", "self", ".", "__data_and_...
Shape of the underlying data, if only one.
[ "Shape", "of", "the", "underlying", "data", "if", "only", "one", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L1482-L1486
nion-software/nionswift
nion/swift/model/DisplayItem.py
DisplayItem.view_to_intervals
def view_to_intervals(self, data_and_metadata: DataAndMetadata.DataAndMetadata, intervals: typing.List[typing.Tuple[float, float]]) -> None: """Change the view to encompass the channels and data represented by the given intervals.""" left = None right = None for interval in intervals: ...
python
def view_to_intervals(self, data_and_metadata: DataAndMetadata.DataAndMetadata, intervals: typing.List[typing.Tuple[float, float]]) -> None: """Change the view to encompass the channels and data represented by the given intervals.""" left = None right = None for interval in intervals: ...
[ "def", "view_to_intervals", "(", "self", ",", "data_and_metadata", ":", "DataAndMetadata", ".", "DataAndMetadata", ",", "intervals", ":", "typing", ".", "List", "[", "typing", ".", "Tuple", "[", "float", ",", "float", "]", "]", ")", "->", "None", ":", "lef...
Change the view to encompass the channels and data represented by the given intervals.
[ "Change", "the", "view", "to", "encompass", "the", "channels", "and", "data", "represented", "by", "the", "given", "intervals", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DisplayItem.py#L1587-L1611
nion-software/nionswift
nion/swift/model/NDataHandler.py
write_local_file
def write_local_file(fp, name_bytes, writer, dt): """ Writes a zip file local file header structure at the current file position. Returns data_len, crc32 for the data. :param fp: the file point to which to write the header :param name: the name of the file :param writer: a ...
python
def write_local_file(fp, name_bytes, writer, dt): """ Writes a zip file local file header structure at the current file position. Returns data_len, crc32 for the data. :param fp: the file point to which to write the header :param name: the name of the file :param writer: a ...
[ "def", "write_local_file", "(", "fp", ",", "name_bytes", ",", "writer", ",", "dt", ")", ":", "fp", ".", "write", "(", "struct", ".", "pack", "(", "'I'", ",", "0x04034b50", ")", ")", "# local file header", "fp", ".", "write", "(", "struct", ".", "pack",...
Writes a zip file local file header structure at the current file position. Returns data_len, crc32 for the data. :param fp: the file point to which to write the header :param name: the name of the file :param writer: a function taking an fp parameter to do the writing, returns crc32 ...
[ "Writes", "a", "zip", "file", "local", "file", "header", "structure", "at", "the", "current", "file", "position", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L40-L77
nion-software/nionswift
nion/swift/model/NDataHandler.py
write_directory_data
def write_directory_data(fp, offset, name_bytes, data_len, crc32, dt): """ Write a zip fie directory entry at the current file position :param fp: the file point to which to write the header :param offset: the offset of the associated local file header :param name: the name of the f...
python
def write_directory_data(fp, offset, name_bytes, data_len, crc32, dt): """ Write a zip fie directory entry at the current file position :param fp: the file point to which to write the header :param offset: the offset of the associated local file header :param name: the name of the f...
[ "def", "write_directory_data", "(", "fp", ",", "offset", ",", "name_bytes", ",", "data_len", ",", "crc32", ",", "dt", ")", ":", "fp", ".", "write", "(", "struct", ".", "pack", "(", "'I'", ",", "0x02014b50", ")", ")", "# central directory header", "fp", "...
Write a zip fie directory entry at the current file position :param fp: the file point to which to write the header :param offset: the offset of the associated local file header :param name: the name of the file :param data_len: the length of data that will be written to the archive ...
[ "Write", "a", "zip", "fie", "directory", "entry", "at", "the", "current", "file", "position" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L80-L110
nion-software/nionswift
nion/swift/model/NDataHandler.py
write_end_of_directory
def write_end_of_directory(fp, dir_size, dir_offset, count): """ Write zip file end of directory header at the current file position :param fp: the file point to which to write the header :param dir_size: the total size of the directory :param dir_offset: the start of the first dire...
python
def write_end_of_directory(fp, dir_size, dir_offset, count): """ Write zip file end of directory header at the current file position :param fp: the file point to which to write the header :param dir_size: the total size of the directory :param dir_offset: the start of the first dire...
[ "def", "write_end_of_directory", "(", "fp", ",", "dir_size", ",", "dir_offset", ",", "count", ")", ":", "fp", ".", "write", "(", "struct", ".", "pack", "(", "'I'", ",", "0x06054b50", ")", ")", "# central directory header", "fp", ".", "write", "(", "struct"...
Write zip file end of directory header at the current file position :param fp: the file point to which to write the header :param dir_size: the total size of the directory :param dir_offset: the start of the first directory header :param count: the count of files
[ "Write", "zip", "file", "end", "of", "directory", "header", "at", "the", "current", "file", "position" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L113-L129
nion-software/nionswift
nion/swift/model/NDataHandler.py
write_zip_fp
def write_zip_fp(fp, data, properties, dir_data_list=None): """ Write custom zip file of data and properties to fp :param fp: the file point to which to write the header :param data: the data to write to the file; may be None :param properties: the properties to write to the file; m...
python
def write_zip_fp(fp, data, properties, dir_data_list=None): """ Write custom zip file of data and properties to fp :param fp: the file point to which to write the header :param data: the data to write to the file; may be None :param properties: the properties to write to the file; m...
[ "def", "write_zip_fp", "(", "fp", ",", "data", ",", "properties", ",", "dir_data_list", "=", "None", ")", ":", "assert", "data", "is", "not", "None", "or", "properties", "is", "not", "None", "# dir_data_list has the format: local file record offset, name, data length,...
Write custom zip file of data and properties to fp :param fp: the file point to which to write the header :param data: the data to write to the file; may be None :param properties: the properties to write to the file; may be None :param dir_data_list: optional list of directory header i...
[ "Write", "custom", "zip", "file", "of", "data", "and", "properties", "to", "fp" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L132-L199
nion-software/nionswift
nion/swift/model/NDataHandler.py
write_zip
def write_zip(file_path, data, properties): """ Write custom zip file to the file path :param file_path: the file to which to write the zip file :param data: the data to write to the file; may be None :param properties: the properties to write to the file; may be None The p...
python
def write_zip(file_path, data, properties): """ Write custom zip file to the file path :param file_path: the file to which to write the zip file :param data: the data to write to the file; may be None :param properties: the properties to write to the file; may be None The p...
[ "def", "write_zip", "(", "file_path", ",", "data", ",", "properties", ")", ":", "with", "open", "(", "file_path", ",", "\"w+b\"", ")", "as", "fp", ":", "write_zip_fp", "(", "fp", ",", "data", ",", "properties", ")" ]
Write custom zip file to the file path :param file_path: the file to which to write the zip file :param data: the data to write to the file; may be None :param properties: the properties to write to the file; may be None The properties param must not change during this method. Callers ...
[ "Write", "custom", "zip", "file", "to", "the", "file", "path" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L202-L216
nion-software/nionswift
nion/swift/model/NDataHandler.py
parse_zip
def parse_zip(fp): """ Parse the zip file headers at fp :param fp: the file pointer from which to parse the zip file :return: A tuple of local files, directory headers, and end of central directory The local files are dictionary where the keys are the local file offset and the ...
python
def parse_zip(fp): """ Parse the zip file headers at fp :param fp: the file pointer from which to parse the zip file :return: A tuple of local files, directory headers, and end of central directory The local files are dictionary where the keys are the local file offset and the ...
[ "def", "parse_zip", "(", "fp", ")", ":", "local_files", "=", "{", "}", "dir_files", "=", "{", "}", "eocd", "=", "None", "fp", ".", "seek", "(", "0", ")", "while", "True", ":", "pos", "=", "fp", ".", "tell", "(", ")", "signature", "=", "struct", ...
Parse the zip file headers at fp :param fp: the file pointer from which to parse the zip file :return: A tuple of local files, directory headers, and end of central directory The local files are dictionary where the keys are the local file offset and the values are each a tuple consist...
[ "Parse", "the", "zip", "file", "headers", "at", "fp" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L219-L275
nion-software/nionswift
nion/swift/model/NDataHandler.py
read_data
def read_data(fp, local_files, dir_files, name_bytes): """ Read a numpy data array from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the data file to read :return...
python
def read_data(fp, local_files, dir_files, name_bytes): """ Read a numpy data array from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the data file to read :return...
[ "def", "read_data", "(", "fp", ",", "local_files", ",", "dir_files", ",", "name_bytes", ")", ":", "if", "name_bytes", "in", "dir_files", ":", "fp", ".", "seek", "(", "local_files", "[", "dir_files", "[", "name_bytes", "]", "[", "1", "]", "]", "[", "1",...
Read a numpy data array from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the data file to read :return: the numpy data array, if found The file pointer will be at a...
[ "Read", "a", "numpy", "data", "array", "from", "the", "zip", "file" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L278-L297
nion-software/nionswift
nion/swift/model/NDataHandler.py
read_json
def read_json(fp, local_files, dir_files, name_bytes): """ Read json properties from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the json file to read :return: t...
python
def read_json(fp, local_files, dir_files, name_bytes): """ Read json properties from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the json file to read :return: t...
[ "def", "read_json", "(", "fp", ",", "local_files", ",", "dir_files", ",", "name_bytes", ")", ":", "if", "name_bytes", "in", "dir_files", ":", "json_pos", "=", "local_files", "[", "dir_files", "[", "name_bytes", "]", "[", "1", "]", "]", "[", "1", "]", "...
Read json properties from the zip file :param fp: a file pointer :param local_files: the local files structure :param dir_files: the directory headers :param name: the name of the json file to read :return: the json properites as a dictionary, if found The file pointer ...
[ "Read", "json", "properties", "from", "the", "zip", "file" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L300-L322
nion-software/nionswift
nion/swift/model/NDataHandler.py
rewrite_zip
def rewrite_zip(file_path, properties): """ Rewrite the json properties in the zip file :param file_path: the file path to the zip file :param properties: the updated properties to write to the zip file This method will attempt to keep the data file within the zip file inta...
python
def rewrite_zip(file_path, properties): """ Rewrite the json properties in the zip file :param file_path: the file path to the zip file :param properties: the updated properties to write to the zip file This method will attempt to keep the data file within the zip file inta...
[ "def", "rewrite_zip", "(", "file_path", ",", "properties", ")", ":", "with", "open", "(", "file_path", ",", "\"r+b\"", ")", "as", "fp", ":", "local_files", ",", "dir_files", ",", "eocd", "=", "parse_zip", "(", "fp", ")", "# check to make sure directory has two...
Rewrite the json properties in the zip file :param file_path: the file path to the zip file :param properties: the updated properties to write to the zip file This method will attempt to keep the data file within the zip file intact without rewriting it. However, if the data file is no...
[ "Rewrite", "the", "json", "properties", "in", "the", "zip", "file" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L325-L356
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.is_matching
def is_matching(cls, file_path): """ Return whether the given absolute file path is an ndata file. """ if file_path.endswith(".ndata") and os.path.exists(file_path): try: with open(file_path, "r+b") as fp: local_files, dir_files, eocd =...
python
def is_matching(cls, file_path): """ Return whether the given absolute file path is an ndata file. """ if file_path.endswith(".ndata") and os.path.exists(file_path): try: with open(file_path, "r+b") as fp: local_files, dir_files, eocd =...
[ "def", "is_matching", "(", "cls", ",", "file_path", ")", ":", "if", "file_path", ".", "endswith", "(", "\".ndata\"", ")", "and", "os", ".", "path", ".", "exists", "(", "file_path", ")", ":", "try", ":", "with", "open", "(", "file_path", ",", "\"r+b\"",...
Return whether the given absolute file path is an ndata file.
[ "Return", "whether", "the", "given", "absolute", "file", "path", "is", "an", "ndata", "file", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L393-L411
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.write_data
def write_data(self, data, file_datetime): """ Write data to the ndata file specified by reference. :param data: the numpy array data to write :param file_datetime: the datetime for the file """ with self.__lock: assert data is not None ...
python
def write_data(self, data, file_datetime): """ Write data to the ndata file specified by reference. :param data: the numpy array data to write :param file_datetime: the datetime for the file """ with self.__lock: assert data is not None ...
[ "def", "write_data", "(", "self", ",", "data", ",", "file_datetime", ")", ":", "with", "self", ".", "__lock", ":", "assert", "data", "is", "not", "None", "absolute_file_path", "=", "self", ".", "__file_path", "#logging.debug(\"WRITE data file %s for %s\", absolute_f...
Write data to the ndata file specified by reference. :param data: the numpy array data to write :param file_datetime: the datetime for the file
[ "Write", "data", "to", "the", "ndata", "file", "specified", "by", "reference", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L425-L442
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.write_properties
def write_properties(self, properties, file_datetime): """ Write properties to the ndata file specified by reference. :param reference: the reference to which to write :param properties: the dict to write to the file :param file_datetime: the datetime for the fil...
python
def write_properties(self, properties, file_datetime): """ Write properties to the ndata file specified by reference. :param reference: the reference to which to write :param properties: the dict to write to the file :param file_datetime: the datetime for the fil...
[ "def", "write_properties", "(", "self", ",", "properties", ",", "file_datetime", ")", ":", "with", "self", ".", "__lock", ":", "absolute_file_path", "=", "self", ".", "__file_path", "#logging.debug(\"WRITE properties %s for %s\", absolute_file_path, key)", "make_directory_i...
Write properties to the ndata file specified by reference. :param reference: the reference to which to write :param properties: the dict to write to the file :param file_datetime: the datetime for the file The properties param must not change during this method. Callers...
[ "Write", "properties", "to", "the", "ndata", "file", "specified", "by", "reference", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L444-L467
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.read_properties
def read_properties(self): """ Read properties from the ndata file reference :param reference: the reference from which to read :return: a tuple of the item_uuid and a dict of the properties """ with self.__lock: absolute_file_path = self.__file_p...
python
def read_properties(self): """ Read properties from the ndata file reference :param reference: the reference from which to read :return: a tuple of the item_uuid and a dict of the properties """ with self.__lock: absolute_file_path = self.__file_p...
[ "def", "read_properties", "(", "self", ")", ":", "with", "self", ".", "__lock", ":", "absolute_file_path", "=", "self", ".", "__file_path", "with", "open", "(", "absolute_file_path", ",", "\"rb\"", ")", "as", "fp", ":", "local_files", ",", "dir_files", ",", ...
Read properties from the ndata file reference :param reference: the reference from which to read :return: a tuple of the item_uuid and a dict of the properties
[ "Read", "properties", "from", "the", "ndata", "file", "reference" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L469-L481
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.read_data
def read_data(self): """ Read data from the ndata file reference :param reference: the reference from which to read :return: a numpy array of the data; maybe None """ with self.__lock: absolute_file_path = self.__file_path #logging.deb...
python
def read_data(self): """ Read data from the ndata file reference :param reference: the reference from which to read :return: a numpy array of the data; maybe None """ with self.__lock: absolute_file_path = self.__file_path #logging.deb...
[ "def", "read_data", "(", "self", ")", ":", "with", "self", ".", "__lock", ":", "absolute_file_path", "=", "self", ".", "__file_path", "#logging.debug(\"READ data file %s\", absolute_file_path)", "with", "open", "(", "absolute_file_path", ",", "\"rb\"", ")", "as", "f...
Read data from the ndata file reference :param reference: the reference from which to read :return: a numpy array of the data; maybe None
[ "Read", "data", "from", "the", "ndata", "file", "reference" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L483-L496
nion-software/nionswift
nion/swift/model/NDataHandler.py
NDataHandler.remove
def remove(self): """ Remove the ndata file reference :param reference: the reference to remove """ with self.__lock: absolute_file_path = self.__file_path #logging.debug("DELETE data file %s", absolute_file_path) if os.path.isfile(abs...
python
def remove(self): """ Remove the ndata file reference :param reference: the reference to remove """ with self.__lock: absolute_file_path = self.__file_path #logging.debug("DELETE data file %s", absolute_file_path) if os.path.isfile(abs...
[ "def", "remove", "(", "self", ")", ":", "with", "self", ".", "__lock", ":", "absolute_file_path", "=", "self", ".", "__file_path", "#logging.debug(\"DELETE data file %s\", absolute_file_path)", "if", "os", ".", "path", ".", "isfile", "(", "absolute_file_path", ")", ...
Remove the ndata file reference :param reference: the reference to remove
[ "Remove", "the", "ndata", "file", "reference" ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/NDataHandler.py#L498-L508
nion-software/nionswift
nion/swift/DisplayPanel.py
DisplayPanelManager.build_menu
def build_menu(self, display_type_menu, document_controller, display_panel): """Build the dynamic menu for the selected display panel. The user accesses this menu by right-clicking on the display panel. The basic menu items are to an empty display panel or a browser display panel. Aft...
python
def build_menu(self, display_type_menu, document_controller, display_panel): """Build the dynamic menu for the selected display panel. The user accesses this menu by right-clicking on the display panel. The basic menu items are to an empty display panel or a browser display panel. Aft...
[ "def", "build_menu", "(", "self", ",", "display_type_menu", ",", "document_controller", ",", "display_panel", ")", ":", "dynamic_live_actions", "=", "list", "(", ")", "def", "switch_to_display_content", "(", "display_panel_type", ")", ":", "self", ".", "switch_to_di...
Build the dynamic menu for the selected display panel. The user accesses this menu by right-clicking on the display panel. The basic menu items are to an empty display panel or a browser display panel. After that, each display controller factory is given a chance to add to the menu. The displ...
[ "Build", "the", "dynamic", "menu", "for", "the", "selected", "display", "panel", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/DisplayPanel.py#L1898-L1936
nion-software/nionswift
nion/swift/model/DataStructure.py
DataStructure.persistent_object_context_changed
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def source_registered(source): self.__source = source def source_unregistered(source=None): pass def reference_registered(pr...
python
def persistent_object_context_changed(self): """ Override from PersistentObject. """ super().persistent_object_context_changed() def source_registered(source): self.__source = source def source_unregistered(source=None): pass def reference_registered(pr...
[ "def", "persistent_object_context_changed", "(", "self", ")", ":", "super", "(", ")", ".", "persistent_object_context_changed", "(", ")", "def", "source_registered", "(", "source", ")", ":", "self", ".", "__source", "=", "source", "def", "source_unregistered", "("...
Override from PersistentObject.
[ "Override", "from", "PersistentObject", "." ]
train
https://github.com/nion-software/nionswift/blob/d43693eaf057b8683b9638e575000f055fede452/nion/swift/model/DataStructure.py#L114-L141
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.ativar_sat
def ativar_sat(self, tipo_certificado, cnpj, codigo_uf): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especializada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT """ resp = self._http_post('ativarsat', ...
python
def ativar_sat(self, tipo_certificado, cnpj, codigo_uf): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especializada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT """ resp = self._http_post('ativarsat', ...
[ "def", "ativar_sat", "(", "self", ",", "tipo_certificado", ",", "cnpj", ",", "codigo_uf", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'ativarsat'", ",", "tipo_certificado", "=", "tipo_certificado", ",", "cnpj", "=", "cnpj", ",", "codigo_uf", "=",...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.ativar_sat`. :return: Uma resposta SAT especializada em ``AtivarSAT``. :rtype: satcfe.resposta.ativarsat.RespostaAtivarSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "ativar_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L103-L114
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.comunicar_certificado_icpbrasil
def comunicar_certificado_icpbrasil(self, certificado): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('comunicarcertificadoicpbrasil', ...
python
def comunicar_certificado_icpbrasil(self, certificado): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('comunicarcertificadoicpbrasil', ...
[ "def", "comunicar_certificado_icpbrasil", "(", "self", ",", "certificado", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'comunicarcertificadoicpbrasil'", ",", "certificado", "=", "certificado", ")", "conteudo", "=", "resp", ".", "json", "(", ")", "ret...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.comunicar_certificado_icpbrasil`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "comunicar_certificado_icpbrasil", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L117-L127
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.enviar_dados_venda
def enviar_dados_venda(self, dados_venda): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda """ resp = self._http_post('enviardadosve...
python
def enviar_dados_venda(self, dados_venda): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda """ resp = self._http_post('enviardadosve...
[ "def", "enviar_dados_venda", "(", "self", ",", "dados_venda", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'enviardadosvenda'", ",", "dados_venda", "=", "dados_venda", ".", "documento", "(", ")", ")", "conteudo", "=", "resp", ".", "json", "(", "...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.enviar_dados_venda`. :return: Uma resposta SAT especializada em ``EnviarDadosVenda``. :rtype: satcfe.resposta.enviardadosvenda.RespostaEnviarDadosVenda
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "enviar_dados_venda", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L130-L139
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.cancelar_ultima_venda
def cancelar_ultima_venda(self, chave_cfe, dados_cancelamento): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda """ resp...
python
def cancelar_ultima_venda(self, chave_cfe, dados_cancelamento): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda """ resp...
[ "def", "cancelar_ultima_venda", "(", "self", ",", "chave_cfe", ",", "dados_cancelamento", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'cancelarultimavenda'", ",", "chave_cfe", "=", "chave_cfe", ",", "dados_cancelamento", "=", "dados_cancelamento", ".", ...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.cancelar_ultima_venda`. :return: Uma resposta SAT especializada em ``CancelarUltimaVenda``. :rtype: satcfe.resposta.cancelarultimavenda.RespostaCancelarUltimaVenda
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "cancelar_ultima_venda", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L142-L152
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.consultar_sat
def consultar_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('consultarsat') conteudo = resp.json() return RespostaSAT.consultar_sat(con...
python
def consultar_sat(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('consultarsat') conteudo = resp.json() return RespostaSAT.consultar_sat(con...
[ "def", "consultar_sat", "(", "self", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'consultarsat'", ")", "conteudo", "=", "resp", ".", "json", "(", ")", "return", "RespostaSAT", ".", "consultar_sat", "(", "conteudo", ".", "get", "(", "'retorno'",...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_sat`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_sat", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L155-L163
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.consultar_status_operacional
def consultar_status_operacional(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional """ ...
python
def consultar_status_operacional(self): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional """ ...
[ "def", "consultar_status_operacional", "(", "self", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'consultarstatusoperacional'", ")", "conteudo", "=", "resp", ".", "json", "(", ")", "return", "RespostaConsultarStatusOperacional", ".", "analisar", "(", "c...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_status_operacional`. :return: Uma resposta SAT especializada em ``ConsultarStatusOperacional``. :rtype: satcfe.resposta.consultarstatusoperacional.RespostaConsultarStatusOperacional
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_status_operacional", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L178-L187
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.consultar_numero_sessao
def consultar_numero_sessao(self, numero_sessao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('consultarnumerosessao', ...
python
def consultar_numero_sessao(self, numero_sessao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('consultarnumerosessao', ...
[ "def", "consultar_numero_sessao", "(", "self", ",", "numero_sessao", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'consultarnumerosessao'", ",", "numero_sessao", "=", "numero_sessao", ")", "conteudo", "=", "resp", ".", "json", "(", ")", "return", "R...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.consultar_numero_sessao`. :return: Uma resposta SAT que irá depender da sessão consultada. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "consultar_numero_sessao", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L190-L199
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.configurar_interface_de_rede
def configurar_interface_de_rede(self, configuracao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('configurarinterfacederede', co...
python
def configurar_interface_de_rede(self, configuracao): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('configurarinterfacederede', co...
[ "def", "configurar_interface_de_rede", "(", "self", ",", "configuracao", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'configurarinterfacederede'", ",", "configuracao", "=", "configuracao", ".", "documento", "(", ")", ")", "conteudo", "=", "resp", "."...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.configurar_interface_de_rede`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "configurar_interface_de_rede", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L202-L211
base4sistemas/satcfe
satcfe/clientesathub.py
ClienteSATHub.associar_assinatura
def associar_assinatura(self, sequencia_cnpj, assinatura_ac): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('associarassinatura', sequencia_...
python
def associar_assinatura(self, sequencia_cnpj, assinatura_ac): """Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT """ resp = self._http_post('associarassinatura', sequencia_...
[ "def", "associar_assinatura", "(", "self", ",", "sequencia_cnpj", ",", "assinatura_ac", ")", ":", "resp", "=", "self", ".", "_http_post", "(", "'associarassinatura'", ",", "sequencia_cnpj", "=", "sequencia_cnpj", ",", "assinatura_ac", "=", "assinatura_ac", ")", "#...
Sobrepõe :meth:`~satcfe.base.FuncoesSAT.associar_assinatura`. :return: Uma resposta SAT padrão. :rtype: satcfe.resposta.padrao.RespostaSAT
[ "Sobrepõe", ":", "meth", ":", "~satcfe", ".", "base", ".", "FuncoesSAT", ".", "associar_assinatura", "." ]
train
https://github.com/base4sistemas/satcfe/blob/cb8e8815f4133d3e3d94cf526fa86767b4521ed9/satcfe/clientesathub.py#L214-L224