repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
bokeh/bokeh
bokeh/document/document.py
Document.hold
def hold(self, policy="combine"): ''' Activate a document hold. While a hold is active, no model changes will be applied, or trigger callbacks. Once ``unhold`` is called, the events collected during the hold will be applied according to the hold policy. Args: hold (...
python
def hold(self, policy="combine"): ''' Activate a document hold. While a hold is active, no model changes will be applied, or trigger callbacks. Once ``unhold`` is called, the events collected during the hold will be applied according to the hold policy. Args: hold (...
[ "def", "hold", "(", "self", ",", "policy", "=", "\"combine\"", ")", ":", "if", "self", ".", "_hold", "is", "not", "None", "and", "self", ".", "_hold", "!=", "policy", ":", "log", ".", "warning", "(", "\"hold already active with '%s', ignoring '%s'\"", "%", ...
Activate a document hold. While a hold is active, no model changes will be applied, or trigger callbacks. Once ``unhold`` is called, the events collected during the hold will be applied according to the hold policy. Args: hold ('combine' or 'collect', optional) ...
[ "Activate", "a", "document", "hold", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L591-L635
train
Activate a document hold.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.unhold
def unhold(self): ''' Turn off any active document hold and apply any collected events. Returns: None ''' # no-op if we are already no holding if self._hold is None: return self._hold = None events = list(self._held_events) self._held_events...
python
def unhold(self): ''' Turn off any active document hold and apply any collected events. Returns: None ''' # no-op if we are already no holding if self._hold is None: return self._hold = None events = list(self._held_events) self._held_events...
[ "def", "unhold", "(", "self", ")", ":", "# no-op if we are already no holding", "if", "self", ".", "_hold", "is", "None", ":", "return", "self", ".", "_hold", "=", "None", "events", "=", "list", "(", "self", ".", "_held_events", ")", "self", ".", "_held_ev...
Turn off any active document hold and apply any collected events. Returns: None
[ "Turn", "off", "any", "active", "document", "hold", "and", "apply", "any", "collected", "events", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L637-L652
train
Turn off any active document hold and apply any collected events.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.on_change
def on_change(self, *callbacks): ''' Provide callbacks to invoke if the document or any Model reachable from its roots changes. ''' for callback in callbacks: if callback in self._callbacks: continue _check_callback(callback, ('event',)) self._call...
python
def on_change(self, *callbacks): ''' Provide callbacks to invoke if the document or any Model reachable from its roots changes. ''' for callback in callbacks: if callback in self._callbacks: continue _check_callback(callback, ('event',)) self._call...
[ "def", "on_change", "(", "self", ",", "*", "callbacks", ")", ":", "for", "callback", "in", "callbacks", ":", "if", "callback", "in", "self", ".", "_callbacks", ":", "continue", "_check_callback", "(", "callback", ",", "(", "'event'", ",", ")", ")", "self...
Provide callbacks to invoke if the document or any Model reachable from its roots changes.
[ "Provide", "callbacks", "to", "invoke", "if", "the", "document", "or", "any", "Model", "reachable", "from", "its", "roots", "changes", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L654-L665
train
Provide callbacks to invoke if the document or any Model reachable from its roots changes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.on_session_destroyed
def on_session_destroyed(self, *callbacks): ''' Provide callbacks to invoke when the session serving the Document is destroyed ''' for callback in callbacks: _check_callback(callback, ('session_context',)) self._session_destroyed_callbacks.add(callback)
python
def on_session_destroyed(self, *callbacks): ''' Provide callbacks to invoke when the session serving the Document is destroyed ''' for callback in callbacks: _check_callback(callback, ('session_context',)) self._session_destroyed_callbacks.add(callback)
[ "def", "on_session_destroyed", "(", "self", ",", "*", "callbacks", ")", ":", "for", "callback", "in", "callbacks", ":", "_check_callback", "(", "callback", ",", "(", "'session_context'", ",", ")", ")", "self", ".", "_session_destroyed_callbacks", ".", "add", "...
Provide callbacks to invoke when the session serving the Document is destroyed
[ "Provide", "callbacks", "to", "invoke", "when", "the", "session", "serving", "the", "Document", "is", "destroyed" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L671-L678
train
Provide callbacks to invoke when the session serving the Document is destroyed by the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.remove_root
def remove_root(self, model, setter=None): ''' Remove a model as root model from this Document. Changes to this model may still trigger ``on_change`` callbacks on this document, if the model is still referred to by other root models. Args: model (Model) : ...
python
def remove_root(self, model, setter=None): ''' Remove a model as root model from this Document. Changes to this model may still trigger ``on_change`` callbacks on this document, if the model is still referred to by other root models. Args: model (Model) : ...
[ "def", "remove_root", "(", "self", ",", "model", ",", "setter", "=", "None", ")", ":", "if", "model", "not", "in", "self", ".", "_roots", ":", "return", "# TODO (bev) ValueError?", "self", ".", "_push_all_models_freeze", "(", ")", "try", ":", "self", ".", ...
Remove a model as root model from this Document. Changes to this model may still trigger ``on_change`` callbacks on this document, if the model is still referred to by other root models. Args: model (Model) : The model to add as a root of this document. ...
[ "Remove", "a", "model", "as", "root", "model", "from", "this", "Document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L720-L750
train
Removes a model as a root model from this Document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.replace_with_json
def replace_with_json(self, json): ''' Overwrite everything in this document with the JSON-encoded document. json (JSON-data) : A JSON-encoded document to overwrite this one. Returns: None ''' replacement = self.from_json(json) replaceme...
python
def replace_with_json(self, json): ''' Overwrite everything in this document with the JSON-encoded document. json (JSON-data) : A JSON-encoded document to overwrite this one. Returns: None ''' replacement = self.from_json(json) replaceme...
[ "def", "replace_with_json", "(", "self", ",", "json", ")", ":", "replacement", "=", "self", ".", "from_json", "(", "json", ")", "replacement", ".", "_destructively_move", "(", "self", ")" ]
Overwrite everything in this document with the JSON-encoded document. json (JSON-data) : A JSON-encoded document to overwrite this one. Returns: None
[ "Overwrite", "everything", "in", "this", "document", "with", "the", "JSON", "-", "encoded", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L767-L779
train
Overwrite everything in this document with the JSON - encoded version of the document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.select
def select(self, selector): ''' Query this document for objects that match the given selector. Args: selector (JSON-like query dictionary) : you can query by type or by name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}`` Returns: seq[Model] ...
python
def select(self, selector): ''' Query this document for objects that match the given selector. Args: selector (JSON-like query dictionary) : you can query by type or by name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}`` Returns: seq[Model] ...
[ "def", "select", "(", "self", ",", "selector", ")", ":", "if", "self", ".", "_is_single_string_selector", "(", "selector", ",", "'name'", ")", ":", "# special-case optimization for by-name query", "return", "self", ".", "_all_models_by_name", ".", "get_all", "(", ...
Query this document for objects that match the given selector. Args: selector (JSON-like query dictionary) : you can query by type or by name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}`` Returns: seq[Model]
[ "Query", "this", "document", "for", "objects", "that", "match", "the", "given", "selector", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L781-L796
train
Query this document for objects that match the given selector.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.select_one
def select_one(self, selector): ''' Query this document for objects that match the given selector. Raises an error if more than one object is found. Returns single matching object, or None if nothing is found Args: selector (JSON-like query dictionary) : you can query by ty...
python
def select_one(self, selector): ''' Query this document for objects that match the given selector. Raises an error if more than one object is found. Returns single matching object, or None if nothing is found Args: selector (JSON-like query dictionary) : you can query by ty...
[ "def", "select_one", "(", "self", ",", "selector", ")", ":", "result", "=", "list", "(", "self", ".", "select", "(", "selector", ")", ")", "if", "len", "(", "result", ")", ">", "1", ":", "raise", "ValueError", "(", "\"Found more than one model matching %s:...
Query this document for objects that match the given selector. Raises an error if more than one object is found. Returns single matching object, or None if nothing is found Args: selector (JSON-like query dictionary) : you can query by type or by name, e.g. ``{"type...
[ "Query", "this", "document", "for", "objects", "that", "match", "the", "given", "selector", ".", "Raises", "an", "error", "if", "more", "than", "one", "object", "is", "found", ".", "Returns", "single", "matching", "object", "or", "None", "if", "nothing", "...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L798-L816
train
Query this document for objects that match the given selector. Returns None if no matching object is found.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.to_json_string
def to_json_string(self, indent=None): ''' Convert the document to a JSON string. Args: indent (int or None, optional) : number of spaces to indent, or None to suppress all newlines and indentation (default: None) Returns: str ''' root_i...
python
def to_json_string(self, indent=None): ''' Convert the document to a JSON string. Args: indent (int or None, optional) : number of spaces to indent, or None to suppress all newlines and indentation (default: None) Returns: str ''' root_i...
[ "def", "to_json_string", "(", "self", ",", "indent", "=", "None", ")", ":", "root_ids", "=", "[", "]", "for", "r", "in", "self", ".", "_roots", ":", "root_ids", ".", "append", "(", "r", ".", "id", ")", "root_references", "=", "self", ".", "_all_model...
Convert the document to a JSON string. Args: indent (int or None, optional) : number of spaces to indent, or None to suppress all newlines and indentation (default: None) Returns: str
[ "Convert", "the", "document", "to", "a", "JSON", "string", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L848-L874
train
Convert the document to a JSON string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document.validate
def validate(self): ''' Perform integrity checks on the modes in this document. Returns: None ''' for r in self.roots: refs = r.references() check_integrity(refs)
python
def validate(self): ''' Perform integrity checks on the modes in this document. Returns: None ''' for r in self.roots: refs = r.references() check_integrity(refs)
[ "def", "validate", "(", "self", ")", ":", "for", "r", "in", "self", ".", "roots", ":", "refs", "=", "r", ".", "references", "(", ")", "check_integrity", "(", "refs", ")" ]
Perform integrity checks on the modes in this document. Returns: None
[ "Perform", "integrity", "checks", "on", "the", "modes", "in", "this", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L876-L885
train
Perform integrity checks on the modes in this document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document._add_session_callback
def _add_session_callback(self, callback_obj, callback, one_shot, originator): ''' Internal implementation for adding session callbacks. Args: callback_obj (SessionCallback) : A session callback object that wraps a callable and is passed to ``trigger_on_chang...
python
def _add_session_callback(self, callback_obj, callback, one_shot, originator): ''' Internal implementation for adding session callbacks. Args: callback_obj (SessionCallback) : A session callback object that wraps a callable and is passed to ``trigger_on_chang...
[ "def", "_add_session_callback", "(", "self", ",", "callback_obj", ",", "callback", ",", "one_shot", ",", "originator", ")", ":", "if", "one_shot", ":", "@", "wraps", "(", "callback", ")", "def", "remove_then_invoke", "(", "*", "args", ",", "*", "*", "kwarg...
Internal implementation for adding session callbacks. Args: callback_obj (SessionCallback) : A session callback object that wraps a callable and is passed to ``trigger_on_change``. callback (callable) : A callable to execute when session ...
[ "Internal", "implementation", "for", "adding", "session", "callbacks", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L889-L928
train
Internal implementation for adding a session callback.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document._destructively_move
def _destructively_move(self, dest_doc): ''' Move all data in this doc to the dest_doc, leaving this doc empty. Args: dest_doc (Document) : The Bokeh document to populate with data from this one Returns: None ''' if dest_doc is self: ...
python
def _destructively_move(self, dest_doc): ''' Move all data in this doc to the dest_doc, leaving this doc empty. Args: dest_doc (Document) : The Bokeh document to populate with data from this one Returns: None ''' if dest_doc is self: ...
[ "def", "_destructively_move", "(", "self", ",", "dest_doc", ")", ":", "if", "dest_doc", "is", "self", ":", "raise", "RuntimeError", "(", "\"Attempted to overwrite a document with itself\"", ")", "dest_doc", ".", "clear", "(", ")", "# we have to remove ALL roots before a...
Move all data in this doc to the dest_doc, leaving this doc empty. Args: dest_doc (Document) : The Bokeh document to populate with data from this one Returns: None
[ "Move", "all", "data", "in", "this", "doc", "to", "the", "dest_doc", "leaving", "this", "doc", "empty", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L930-L966
train
Move all data in this doc to dest_doc.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document._notify_change
def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None): ''' Called by Model when it changes ''' # if name changes, update by-name index if attr == 'name': if old is not None: self._all_models_by_name.remove_value(old, m...
python
def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None): ''' Called by Model when it changes ''' # if name changes, update by-name index if attr == 'name': if old is not None: self._all_models_by_name.remove_value(old, m...
[ "def", "_notify_change", "(", "self", ",", "model", ",", "attr", ",", "old", ",", "new", ",", "hint", "=", "None", ",", "setter", "=", "None", ",", "callback_invoker", "=", "None", ")", ":", "# if name changes, update by-name index", "if", "attr", "==", "'...
Called by Model when it changes
[ "Called", "by", "Model", "when", "it", "changes" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L988-L1005
train
Called by Model when it changes
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/document/document.py
Document._remove_session_callback
def _remove_session_callback(self, callback_obj, originator): ''' Remove a callback added earlier with ``add_periodic_callback``, ``add_timeout_callback``, or ``add_next_tick_callback``. Returns: None Raises: KeyError, if the callback was never added ''...
python
def _remove_session_callback(self, callback_obj, originator): ''' Remove a callback added earlier with ``add_periodic_callback``, ``add_timeout_callback``, or ``add_next_tick_callback``. Returns: None Raises: KeyError, if the callback was never added ''...
[ "def", "_remove_session_callback", "(", "self", ",", "callback_obj", ",", "originator", ")", ":", "try", ":", "callback_objs", "=", "[", "callback_obj", "]", "self", ".", "_session_callbacks", ".", "remove", "(", "callback_obj", ")", "for", "cb", ",", "cb_objs...
Remove a callback added earlier with ``add_periodic_callback``, ``add_timeout_callback``, or ``add_next_tick_callback``. Returns: None Raises: KeyError, if the callback was never added
[ "Remove", "a", "callback", "added", "earlier", "with", "add_periodic_callback", "add_timeout_callback", "or", "add_next_tick_callback", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L1046-L1071
train
Removes a callback from the list of callbacks that were added earlier with add_periodic_callback or add_timeout_callback or add_next_tick_callback.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/util/callback_manager.py
_check_callback
def _check_callback(callback, fargs, what="Callback functions"): '''Bokeh-internal function to check callback signature''' sig = signature(callback) formatted_args = format_signature(sig) error_msg = what + " must have signature func(%s), got func%s" all_names, default_values = get_param_info(sig) ...
python
def _check_callback(callback, fargs, what="Callback functions"): '''Bokeh-internal function to check callback signature''' sig = signature(callback) formatted_args = format_signature(sig) error_msg = what + " must have signature func(%s), got func%s" all_names, default_values = get_param_info(sig) ...
[ "def", "_check_callback", "(", "callback", ",", "fargs", ",", "what", "=", "\"Callback functions\"", ")", ":", "sig", "=", "signature", "(", "callback", ")", "formatted_args", "=", "format_signature", "(", "sig", ")", "error_msg", "=", "what", "+", "\" must ha...
Bokeh-internal function to check callback signature
[ "Bokeh", "-", "internal", "function", "to", "check", "callback", "signature" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/callback_manager.py#L178-L188
train
Bokeh - internal function to check callback signature
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/util/callback_manager.py
PropertyCallbackManager.on_change
def on_change(self, attr, *callbacks): ''' Add a callback on this object to trigger when ``attr`` changes. Args: attr (str) : an attribute name on this object callback (callable) : a callback function to register Returns: None ''' if len(cal...
python
def on_change(self, attr, *callbacks): ''' Add a callback on this object to trigger when ``attr`` changes. Args: attr (str) : an attribute name on this object callback (callable) : a callback function to register Returns: None ''' if len(cal...
[ "def", "on_change", "(", "self", ",", "attr", ",", "*", "callbacks", ")", ":", "if", "len", "(", "callbacks", ")", "==", "0", ":", "raise", "ValueError", "(", "\"on_change takes an attribute name and one or more callbacks, got only one parameter\"", ")", "_callbacks",...
Add a callback on this object to trigger when ``attr`` changes. Args: attr (str) : an attribute name on this object callback (callable) : a callback function to register Returns: None
[ "Add", "a", "callback", "on", "this", "object", "to", "trigger", "when", "attr", "changes", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/callback_manager.py#L111-L133
train
Add a callback to trigger when attr changes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/util/callback_manager.py
PropertyCallbackManager.remove_on_change
def remove_on_change(self, attr, *callbacks): ''' Remove a callback from this object ''' if len(callbacks) == 0: raise ValueError("remove_on_change takes an attribute name and one or more callbacks, got only one parameter") _callbacks = self._callbacks.setdefault(attr, []) fo...
python
def remove_on_change(self, attr, *callbacks): ''' Remove a callback from this object ''' if len(callbacks) == 0: raise ValueError("remove_on_change takes an attribute name and one or more callbacks, got only one parameter") _callbacks = self._callbacks.setdefault(attr, []) fo...
[ "def", "remove_on_change", "(", "self", ",", "attr", ",", "*", "callbacks", ")", ":", "if", "len", "(", "callbacks", ")", "==", "0", ":", "raise", "ValueError", "(", "\"remove_on_change takes an attribute name and one or more callbacks, got only one parameter\"", ")", ...
Remove a callback from this object
[ "Remove", "a", "callback", "from", "this", "object" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/callback_manager.py#L135-L141
train
Removes a callback from this object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/util/callback_manager.py
PropertyCallbackManager.trigger
def trigger(self, attr, old, new, hint=None, setter=None): ''' Trigger callbacks for ``attr`` on this object. Args: attr (str) : old (object) : new (object) : Returns: None ''' def invoke(): callbacks = self._callback...
python
def trigger(self, attr, old, new, hint=None, setter=None): ''' Trigger callbacks for ``attr`` on this object. Args: attr (str) : old (object) : new (object) : Returns: None ''' def invoke(): callbacks = self._callback...
[ "def", "trigger", "(", "self", ",", "attr", ",", "old", ",", "new", ",", "hint", "=", "None", ",", "setter", "=", "None", ")", ":", "def", "invoke", "(", ")", ":", "callbacks", "=", "self", ".", "_callbacks", ".", "get", "(", "attr", ")", "if", ...
Trigger callbacks for ``attr`` on this object. Args: attr (str) : old (object) : new (object) : Returns: None
[ "Trigger", "callbacks", "for", "attr", "on", "this", "object", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/callback_manager.py#L143-L163
train
Triggers callbacks for attr on this object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/util/sampledata.py
download
def download(progress=True): ''' Download larger data sets for various Bokeh examples. ''' data_dir = external_data_dir(create=True) print("Using data directory: %s" % data_dir) s3 = 'https://bokeh-sampledata.s3.amazonaws.com' files = [ (s3, 'CGM.csv'), (s3, 'US_Counties.zip'),...
python
def download(progress=True): ''' Download larger data sets for various Bokeh examples. ''' data_dir = external_data_dir(create=True) print("Using data directory: %s" % data_dir) s3 = 'https://bokeh-sampledata.s3.amazonaws.com' files = [ (s3, 'CGM.csv'), (s3, 'US_Counties.zip'),...
[ "def", "download", "(", "progress", "=", "True", ")", ":", "data_dir", "=", "external_data_dir", "(", "create", "=", "True", ")", "print", "(", "\"Using data directory: %s\"", "%", "data_dir", ")", "s3", "=", "'https://bokeh-sampledata.s3.amazonaws.com'", "files", ...
Download larger data sets for various Bokeh examples.
[ "Download", "larger", "data", "sets", "for", "various", "Bokeh", "examples", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/sampledata.py#L49-L81
train
Download larger data sets for various Bokeh examples.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/command/bootstrap.py
main
def main(argv): ''' Execute the Bokeh command. Args: argv (seq[str]) : a list of command line arguments to process Returns: None The first item in ``argv`` is typically "bokeh", and the second should be the name of one of the available subcommands: * :ref:`html <bokeh.command...
python
def main(argv): ''' Execute the Bokeh command. Args: argv (seq[str]) : a list of command line arguments to process Returns: None The first item in ``argv`` is typically "bokeh", and the second should be the name of one of the available subcommands: * :ref:`html <bokeh.command...
[ "def", "main", "(", "argv", ")", ":", "if", "len", "(", "argv", ")", "==", "1", ":", "die", "(", "\"ERROR: Must specify subcommand, one of: %s\"", "%", "nice_join", "(", "x", ".", "name", "for", "x", "in", "subcommands", ".", "all", ")", ")", "parser", ...
Execute the Bokeh command. Args: argv (seq[str]) : a list of command line arguments to process Returns: None The first item in ``argv`` is typically "bokeh", and the second should be the name of one of the available subcommands: * :ref:`html <bokeh.command.subcommands.html>` ...
[ "Execute", "the", "Bokeh", "command", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/command/bootstrap.py#L69-L115
train
Main entry point for the bokeh - get - tree - tree command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/io/showing.py
show
def show(obj, browser=None, new="tab", notebook_handle=False, notebook_url="localhost:8888", **kw): ''' Immediately display a Bokeh object or application. :func:`show` may be called multiple times in a single Jupyter notebook cell to display multiple objects. The objects are displayed in order. ...
python
def show(obj, browser=None, new="tab", notebook_handle=False, notebook_url="localhost:8888", **kw): ''' Immediately display a Bokeh object or application. :func:`show` may be called multiple times in a single Jupyter notebook cell to display multiple objects. The objects are displayed in order. ...
[ "def", "show", "(", "obj", ",", "browser", "=", "None", ",", "new", "=", "\"tab\"", ",", "notebook_handle", "=", "False", ",", "notebook_url", "=", "\"localhost:8888\"", ",", "*", "*", "kw", ")", ":", "state", "=", "curstate", "(", ")", "is_application",...
Immediately display a Bokeh object or application. :func:`show` may be called multiple times in a single Jupyter notebook cell to display multiple objects. The objects are displayed in order. Args: obj (LayoutDOM or Application or callable) : A Bokeh object to display. ...
[ "Immediately", "display", "a", "Bokeh", "object", "or", "application", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/io/showing.py#L46-L145
train
Immediately display a Bokeh object or application.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/embed/elements.py
html_page_for_render_items
def html_page_for_render_items(bundle, docs_json, render_items, title, template=None, template_variables={}): ''' Render an HTML page from a template and Bokeh render items. Args: bundle (tuple): a tuple containing (bokehjs, bokehcss) docs_json (JSON-like): Serialized B...
python
def html_page_for_render_items(bundle, docs_json, render_items, title, template=None, template_variables={}): ''' Render an HTML page from a template and Bokeh render items. Args: bundle (tuple): a tuple containing (bokehjs, bokehcss) docs_json (JSON-like): Serialized B...
[ "def", "html_page_for_render_items", "(", "bundle", ",", "docs_json", ",", "render_items", ",", "title", ",", "template", "=", "None", ",", "template_variables", "=", "{", "}", ")", ":", "if", "title", "is", "None", ":", "title", "=", "DEFAULT_TITLE", "bokeh...
Render an HTML page from a template and Bokeh render items. Args: bundle (tuple): a tuple containing (bokehjs, bokehcss) docs_json (JSON-like): Serialized Bokeh Document render_items (RenderItems) Specific items to render from the document and where ...
[ "Render", "an", "HTML", "page", "from", "a", "template", "and", "Bokeh", "render", "items", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/embed/elements.py#L68-L130
train
Render an HTML page from a template and Bokeh render items.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
examples/app/stocks/download_sample_data.py
extract_hosted_zip
def extract_hosted_zip(data_url, save_dir, exclude_term=None): """Downloads, then extracts a zip file.""" zip_name = os.path.join(save_dir, 'temp.zip') # get the zip file try: print('Downloading %r to %r' % (data_url, zip_name)) zip_name, hdrs = urllib.request.urlretrieve(url=data_url,...
python
def extract_hosted_zip(data_url, save_dir, exclude_term=None): """Downloads, then extracts a zip file.""" zip_name = os.path.join(save_dir, 'temp.zip') # get the zip file try: print('Downloading %r to %r' % (data_url, zip_name)) zip_name, hdrs = urllib.request.urlretrieve(url=data_url,...
[ "def", "extract_hosted_zip", "(", "data_url", ",", "save_dir", ",", "exclude_term", "=", "None", ")", ":", "zip_name", "=", "os", ".", "path", ".", "join", "(", "save_dir", ",", "'temp.zip'", ")", "# get the zip file", "try", ":", "print", "(", "'Downloading...
Downloads, then extracts a zip file.
[ "Downloads", "then", "extracts", "a", "zip", "file", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/app/stocks/download_sample_data.py#L7-L24
train
Downloads then extracts a zip file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
examples/app/stocks/download_sample_data.py
extract_zip
def extract_zip(zip_name, exclude_term=None): """Extracts a zip file to its containing directory.""" zip_dir = os.path.dirname(os.path.abspath(zip_name)) try: with zipfile.ZipFile(zip_name) as z: # write each zipped file out if it isn't a directory files = [zip_file for zi...
python
def extract_zip(zip_name, exclude_term=None): """Extracts a zip file to its containing directory.""" zip_dir = os.path.dirname(os.path.abspath(zip_name)) try: with zipfile.ZipFile(zip_name) as z: # write each zipped file out if it isn't a directory files = [zip_file for zi...
[ "def", "extract_zip", "(", "zip_name", ",", "exclude_term", "=", "None", ")", ":", "zip_dir", "=", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".", "abspath", "(", "zip_name", ")", ")", "try", ":", "with", "zipfile", ".", "ZipFile", "(...
Extracts a zip file to its containing directory.
[ "Extracts", "a", "zip", "file", "to", "its", "containing", "directory", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/app/stocks/download_sample_data.py#L27-L61
train
Extracts a zip file to its containing directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/models/widgets/sliders.py
DateRangeSlider.value_as_datetime
def value_as_datetime(self): ''' Convenience property to retrieve the value tuple as a tuple of datetime objects. ''' if self.value is None: return None v1, v2 = self.value if isinstance(v1, numbers.Number): d1 = datetime.utcfromtimestamp(v1 / 100...
python
def value_as_datetime(self): ''' Convenience property to retrieve the value tuple as a tuple of datetime objects. ''' if self.value is None: return None v1, v2 = self.value if isinstance(v1, numbers.Number): d1 = datetime.utcfromtimestamp(v1 / 100...
[ "def", "value_as_datetime", "(", "self", ")", ":", "if", "self", ".", "value", "is", "None", ":", "return", "None", "v1", ",", "v2", "=", "self", ".", "value", "if", "isinstance", "(", "v1", ",", "numbers", ".", "Number", ")", ":", "d1", "=", "date...
Convenience property to retrieve the value tuple as a tuple of datetime objects.
[ "Convenience", "property", "to", "retrieve", "the", "value", "tuple", "as", "a", "tuple", "of", "datetime", "objects", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/widgets/sliders.py#L182-L198
train
Convenience property to retrieve the value tuple as a tuple of datetime objects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/models/widgets/sliders.py
DateRangeSlider.value_as_date
def value_as_date(self): ''' Convenience property to retrieve the value tuple as a tuple of date objects. Added in version 1.1 ''' if self.value is None: return None v1, v2 = self.value if isinstance(v1, numbers.Number): dt = datetime.utcf...
python
def value_as_date(self): ''' Convenience property to retrieve the value tuple as a tuple of date objects. Added in version 1.1 ''' if self.value is None: return None v1, v2 = self.value if isinstance(v1, numbers.Number): dt = datetime.utcf...
[ "def", "value_as_date", "(", "self", ")", ":", "if", "self", ".", "value", "is", "None", ":", "return", "None", "v1", ",", "v2", "=", "self", ".", "value", "if", "isinstance", "(", "v1", ",", "numbers", ".", "Number", ")", ":", "dt", "=", "datetime...
Convenience property to retrieve the value tuple as a tuple of date objects. Added in version 1.1
[ "Convenience", "property", "to", "retrieve", "the", "value", "tuple", "as", "a", "tuple", "of", "date", "objects", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/widgets/sliders.py#L201-L220
train
Convenience property to retrieve the value tuple as a tuple of date objects. Added in version 1. 1 Added in version 1. 1
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/application/handlers/directory.py
DirectoryHandler.modify_document
def modify_document(self, doc): ''' Execute the configured ``main.py`` or ``main.ipynb`` to modify the document. This method will also search the app directory for any theme or template files, and automatically configure the document with them if they are found. ''' ...
python
def modify_document(self, doc): ''' Execute the configured ``main.py`` or ``main.ipynb`` to modify the document. This method will also search the app directory for any theme or template files, and automatically configure the document with them if they are found. ''' ...
[ "def", "modify_document", "(", "self", ",", "doc", ")", ":", "if", "self", ".", "_lifecycle_handler", ".", "failed", ":", "return", "# Note: we do NOT copy self._theme, which assumes the Theme", "# class is immutable (has no setters)", "if", "self", ".", "_theme", "is", ...
Execute the configured ``main.py`` or ``main.ipynb`` to modify the document. This method will also search the app directory for any theme or template files, and automatically configure the document with them if they are found.
[ "Execute", "the", "configured", "main", ".", "py", "or", "main", ".", "ipynb", "to", "modify", "the", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/application/handlers/directory.py#L173-L193
train
Execute the configured main. py or main. ipynb to modify the document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
markers
def markers(): ''' Prints a list of valid marker types for scatter() Returns: None ''' print("Available markers: \n\n - " + "\n - ".join(list(MarkerType))) print() print("Shortcuts: \n\n" + "\n".join(" %r: %s" % item for item in _MARKER_SHORTCUTS.items()))
python
def markers(): ''' Prints a list of valid marker types for scatter() Returns: None ''' print("Available markers: \n\n - " + "\n - ".join(list(MarkerType))) print() print("Shortcuts: \n\n" + "\n".join(" %r: %s" % item for item in _MARKER_SHORTCUTS.items()))
[ "def", "markers", "(", ")", ":", "print", "(", "\"Available markers: \\n\\n - \"", "+", "\"\\n - \"", ".", "join", "(", "list", "(", "MarkerType", ")", ")", ")", "print", "(", ")", "print", "(", "\"Shortcuts: \\n\\n\"", "+", "\"\\n\"", ".", "join", "(", "\...
Prints a list of valid marker types for scatter() Returns: None
[ "Prints", "a", "list", "of", "valid", "marker", "types", "for", "scatter", "()" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L1179-L1187
train
Prints a list of valid marker types for scatter
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.scatter
def scatter(self, *args, **kwargs): ''' Creates a scatter plot of the given x and y items. Args: x (str or seq[float]) : values or field names of center x coordinates y (str or seq[float]) : values or field names of center y coordinates size (str or list[float]) : ...
python
def scatter(self, *args, **kwargs): ''' Creates a scatter plot of the given x and y items. Args: x (str or seq[float]) : values or field names of center x coordinates y (str or seq[float]) : values or field names of center y coordinates size (str or list[float]) : ...
[ "def", "scatter", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "marker_type", "=", "kwargs", ".", "pop", "(", "\"marker\"", ",", "\"circle\"", ")", "if", "isinstance", "(", "marker_type", ",", "string_types", ")", "and", "marker_type...
Creates a scatter plot of the given x and y items. Args: x (str or seq[float]) : values or field names of center x coordinates y (str or seq[float]) : values or field names of center y coordinates size (str or list[float]) : values or field names of sizes in screen units ...
[ "Creates", "a", "scatter", "plot", "of", "the", "given", "x", "and", "y", "items", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L757-L801
train
Creates a scatter plot of the given x and y items.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.hexbin
def hexbin(self, x, y, size, orientation="pointytop", palette="Viridis256", line_color=None, fill_color=None, aspect_scale=1, **kwargs): ''' Perform a simple equal-weight hexagonal binning. A :class:`~bokeh.models._glyphs.HexTile` glyph will be added to display the binning. The :class:`~bokeh.m...
python
def hexbin(self, x, y, size, orientation="pointytop", palette="Viridis256", line_color=None, fill_color=None, aspect_scale=1, **kwargs): ''' Perform a simple equal-weight hexagonal binning. A :class:`~bokeh.models._glyphs.HexTile` glyph will be added to display the binning. The :class:`~bokeh.m...
[ "def", "hexbin", "(", "self", ",", "x", ",", "y", ",", "size", ",", "orientation", "=", "\"pointytop\"", ",", "palette", "=", "\"Viridis256\"", ",", "line_color", "=", "None", ",", "fill_color", "=", "None", ",", "aspect_scale", "=", "1", ",", "*", "*"...
Perform a simple equal-weight hexagonal binning. A :class:`~bokeh.models._glyphs.HexTile` glyph will be added to display the binning. The :class:`~bokeh.models.sources.ColumnDataSource` for the glyph will have columns ``q``, ``r``, and ``count``, where ``q`` and ``r`` are `axial coordin...
[ "Perform", "a", "simple", "equal", "-", "weight", "hexagonal", "binning", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L803-L912
train
This function is used to perform a simple equal - weight hexagonal binning on the associated cell.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.harea_stack
def harea_stack(self, stackers, **kw): ''' Generate multiple ``HArea`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``x1`` and ``x2`` harea coordinates. Additional...
python
def harea_stack(self, stackers, **kw): ''' Generate multiple ``HArea`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``x1`` and ``x2`` harea coordinates. Additional...
[ "def", "harea_stack", "(", "self", ",", "stackers", ",", "*", "*", "kw", ")", ":", "result", "=", "[", "]", "for", "kw", "in", "_double_stack", "(", "stackers", ",", "\"x1\"", ",", "\"x2\"", ",", "*", "*", "kw", ")", ":", "result", ".", "append", ...
Generate multiple ``HArea`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``x1`` and ``x2`` harea coordinates. Additionally, the ``name`` of the renderer will be set to ...
[ "Generate", "multiple", "HArea", "renderers", "for", "levels", "stacked", "left", "to", "right", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L914-L954
train
Generates multiple HArea renderers for levels stacked left to right.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.hbar_stack
def hbar_stack(self, stackers, **kw): ''' Generate multiple ``HBar`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additionally, the...
python
def hbar_stack(self, stackers, **kw): ''' Generate multiple ``HBar`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additionally, the...
[ "def", "hbar_stack", "(", "self", ",", "stackers", ",", "*", "*", "kw", ")", ":", "result", "=", "[", "]", "for", "kw", "in", "_double_stack", "(", "stackers", ",", "\"left\"", ",", "\"right\"", ",", "*", "*", "kw", ")", ":", "result", ".", "append...
Generate multiple ``HBar`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additionally, the ``name`` of the renderer will be set to ...
[ "Generate", "multiple", "HBar", "renderers", "for", "levels", "stacked", "left", "to", "right", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L956-L995
train
Generates multiple HBar renderers for levels stacked left to right.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.line_stack
def line_stack(self, x, y, **kw): ''' Generate multiple ``Line`` renderers for lines stacked vertically or horizontally. Args: x (seq[str]) : y (seq[str]) : Additionally, the ``name`` of the renderer will be set to the value of each successive stacker (...
python
def line_stack(self, x, y, **kw): ''' Generate multiple ``Line`` renderers for lines stacked vertically or horizontally. Args: x (seq[str]) : y (seq[str]) : Additionally, the ``name`` of the renderer will be set to the value of each successive stacker (...
[ "def", "line_stack", "(", "self", ",", "x", ",", "y", ",", "*", "*", "kw", ")", ":", "if", "all", "(", "isinstance", "(", "val", ",", "(", "list", ",", "tuple", ")", ")", "for", "val", "in", "(", "x", ",", "y", ")", ")", ":", "raise", "Valu...
Generate multiple ``Line`` renderers for lines stacked vertically or horizontally. Args: x (seq[str]) : y (seq[str]) : Additionally, the ``name`` of the renderer will be set to the value of each successive stacker (this is useful with the special hover ...
[ "Generate", "multiple", "Line", "renderers", "for", "lines", "stacked", "vertically", "or", "horizontally", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L997-L1053
train
Generates multiple Line renderers for lines stacked vertically by y - coordinates or horizontally.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.varea_stack
def varea_stack(self, stackers, **kw): ''' Generate multiple ``VArea`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``y1`` and ``y1`` varea coordinates. Additional...
python
def varea_stack(self, stackers, **kw): ''' Generate multiple ``VArea`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``y1`` and ``y1`` varea coordinates. Additional...
[ "def", "varea_stack", "(", "self", ",", "stackers", ",", "*", "*", "kw", ")", ":", "result", "=", "[", "]", "for", "kw", "in", "_double_stack", "(", "stackers", ",", "\"y1\"", ",", "\"y2\"", ",", "*", "*", "kw", ")", ":", "result", ".", "append", ...
Generate multiple ``VArea`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``y1`` and ``y1`` varea coordinates. Additionally, the ``name`` of the renderer will be set to ...
[ "Generate", "multiple", "VArea", "renderers", "for", "levels", "stacked", "bottom", "to", "top", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L1055-L1095
train
Generates multiple VArea renderers for levels stacked bottom to top.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.vbar_stack
def vbar_stack(self, stackers, **kw): ''' Generate multiple ``VBar`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additiona...
python
def vbar_stack(self, stackers, **kw): ''' Generate multiple ``VBar`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additiona...
[ "def", "vbar_stack", "(", "self", ",", "stackers", ",", "*", "*", "kw", ")", ":", "result", "=", "[", "]", "for", "kw", "in", "_double_stack", "(", "stackers", ",", "\"bottom\"", ",", "\"top\"", ",", "*", "*", "kw", ")", ":", "result", ".", "append...
Generate multiple ``VBar`` renderers for levels stacked bottom to top. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additionally, the ``name`` of the renderer will be set to ...
[ "Generate", "multiple", "VBar", "renderers", "for", "levels", "stacked", "bottom", "to", "top", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L1097-L1137
train
Generates multiple VBar renderers for levels stacked bottom to top.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/plotting/figure.py
Figure.graph
def graph(self, node_source, edge_source, layout_provider, **kwargs): ''' Creates a network graph using the given node, edge and layout provider. Args: node_source (:class:`~bokeh.models.sources.ColumnDataSource`) : a user-supplied data source for the graph nodes. An attempt...
python
def graph(self, node_source, edge_source, layout_provider, **kwargs): ''' Creates a network graph using the given node, edge and layout provider. Args: node_source (:class:`~bokeh.models.sources.ColumnDataSource`) : a user-supplied data source for the graph nodes. An attempt...
[ "def", "graph", "(", "self", ",", "node_source", ",", "edge_source", ",", "layout_provider", ",", "*", "*", "kwargs", ")", ":", "kw", "=", "_graph", "(", "node_source", ",", "edge_source", ",", "*", "*", "kwargs", ")", "graph_renderer", "=", "GraphRenderer...
Creates a network graph using the given node, edge and layout provider. Args: node_source (:class:`~bokeh.models.sources.ColumnDataSource`) : a user-supplied data source for the graph nodes. An attempt will be made to convert the object to :class:`~bokeh.models.sourc...
[ "Creates", "a", "network", "graph", "using", "the", "given", "node", "edge", "and", "layout", "provider", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/plotting/figure.py#L1139-L1162
train
Creates a network graph using the given node and edge data sources.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/client/util.py
server_url_for_websocket_url
def server_url_for_websocket_url(url): ''' Convert an ``ws(s)`` URL for a Bokeh server into the appropriate ``http(s)`` URL for the websocket endpoint. Args: url (str): An ``ws(s)`` URL ending in ``/ws`` Returns: str: The corresponding ``http(s)`` URL. Rais...
python
def server_url_for_websocket_url(url): ''' Convert an ``ws(s)`` URL for a Bokeh server into the appropriate ``http(s)`` URL for the websocket endpoint. Args: url (str): An ``ws(s)`` URL ending in ``/ws`` Returns: str: The corresponding ``http(s)`` URL. Rais...
[ "def", "server_url_for_websocket_url", "(", "url", ")", ":", "if", "url", ".", "startswith", "(", "\"ws:\"", ")", ":", "reprotocoled", "=", "\"http\"", "+", "url", "[", "2", ":", "]", "elif", "url", ".", "startswith", "(", "\"wss:\"", ")", ":", "reprotoc...
Convert an ``ws(s)`` URL for a Bokeh server into the appropriate ``http(s)`` URL for the websocket endpoint. Args: url (str): An ``ws(s)`` URL ending in ``/ws`` Returns: str: The corresponding ``http(s)`` URL. Raises: ValueError: If the inpu...
[ "Convert", "an", "ws", "(", "s", ")", "URL", "for", "a", "Bokeh", "server", "into", "the", "appropriate", "http", "(", "s", ")", "URL", "for", "the", "websocket", "endpoint", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/util.py#L46-L71
train
Convert an ws URL for a Bokeh server into the appropriate HTTP URL for the websocket endpoint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/client/util.py
websocket_url_for_server_url
def websocket_url_for_server_url(url): ''' Convert an ``http(s)`` URL for a Bokeh server websocket endpoint into the appropriate ``ws(s)`` URL Args: url (str): An ``http(s)`` URL Returns: str: The corresponding ``ws(s)`` URL ending in ``/ws`` Raises: ...
python
def websocket_url_for_server_url(url): ''' Convert an ``http(s)`` URL for a Bokeh server websocket endpoint into the appropriate ``ws(s)`` URL Args: url (str): An ``http(s)`` URL Returns: str: The corresponding ``ws(s)`` URL ending in ``/ws`` Raises: ...
[ "def", "websocket_url_for_server_url", "(", "url", ")", ":", "if", "url", ".", "startswith", "(", "\"http:\"", ")", ":", "reprotocoled", "=", "\"ws\"", "+", "url", "[", "4", ":", "]", "elif", "url", ".", "startswith", "(", "\"https:\"", ")", ":", "reprot...
Convert an ``http(s)`` URL for a Bokeh server websocket endpoint into the appropriate ``ws(s)`` URL Args: url (str): An ``http(s)`` URL Returns: str: The corresponding ``ws(s)`` URL ending in ``/ws`` Raises: ValueError: If the input URL is n...
[ "Convert", "an", "http", "(", "s", ")", "URL", "for", "a", "Bokeh", "server", "websocket", "endpoint", "into", "the", "appropriate", "ws", "(", "s", ")", "URL" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/util.py#L73-L99
train
Convert an HTTP URL for a Bokeh server websocket endpoint into a corresponding ws URL.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/core/property/validation.py
without_property_validation
def without_property_validation(input_function): ''' Turn off property validation during update callbacks Example: .. code-block:: python @without_property_validation def update(attr, old, new): # do things without validation See Also: :class:`~boke...
python
def without_property_validation(input_function): ''' Turn off property validation during update callbacks Example: .. code-block:: python @without_property_validation def update(attr, old, new): # do things without validation See Also: :class:`~boke...
[ "def", "without_property_validation", "(", "input_function", ")", ":", "@", "wraps", "(", "input_function", ")", "def", "func", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "with", "validate", "(", "False", ")", ":", "return", "input_function", "("...
Turn off property validation during update callbacks Example: .. code-block:: python @without_property_validation def update(attr, old, new): # do things without validation See Also: :class:`~bokeh.core.properties.validate`: context mangager for more fi...
[ "Turn", "off", "property", "validation", "during", "update", "callbacks" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/property/validation.py#L80-L98
train
Decorator to turn off property validation during update callbacks Insights is used to update the object with validate = False.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/core/templates.py
get_env
def get_env(): ''' Get the correct Jinja2 Environment, also for frozen scripts. ''' if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): # PyInstaller uses _MEIPASS and only works with jinja2.FileSystemLoader templates_path = join(sys._MEIPASS, 'bokeh', 'core', '_templates') el...
python
def get_env(): ''' Get the correct Jinja2 Environment, also for frozen scripts. ''' if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): # PyInstaller uses _MEIPASS and only works with jinja2.FileSystemLoader templates_path = join(sys._MEIPASS, 'bokeh', 'core', '_templates') el...
[ "def", "get_env", "(", ")", ":", "if", "getattr", "(", "sys", ",", "'frozen'", ",", "False", ")", "and", "hasattr", "(", "sys", ",", "'_MEIPASS'", ")", ":", "# PyInstaller uses _MEIPASS and only works with jinja2.FileSystemLoader", "templates_path", "=", "join", "...
Get the correct Jinja2 Environment, also for frozen scripts.
[ "Get", "the", "correct", "Jinja2", "Environment", "also", "for", "frozen", "scripts", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/templates.py#L72-L82
train
Get the correct Jinja2 Environment also for frozen scripts.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
examples/custom/parallel_plot/parallel_plot.py
parallel_plot
def parallel_plot(df, color=None, palette=None): """From a dataframe create a parallel coordinate plot """ npts = df.shape[0] ndims = len(df.columns) if color is None: color = np.ones(npts) if palette is None: palette = ['#ff0000'] cmap = LinearColorMapper(high=color.min(),...
python
def parallel_plot(df, color=None, palette=None): """From a dataframe create a parallel coordinate plot """ npts = df.shape[0] ndims = len(df.columns) if color is None: color = np.ones(npts) if palette is None: palette = ['#ff0000'] cmap = LinearColorMapper(high=color.min(),...
[ "def", "parallel_plot", "(", "df", ",", "color", "=", "None", ",", "palette", "=", "None", ")", ":", "npts", "=", "df", ".", "shape", "[", "0", "]", "ndims", "=", "len", "(", "df", ".", "columns", ")", "if", "color", "is", "None", ":", "color", ...
From a dataframe create a parallel coordinate plot
[ "From", "a", "dataframe", "create", "a", "parallel", "coordinate", "plot" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/custom/parallel_plot/parallel_plot.py#L14-L107
train
Create a parallel coordinate plot from a dataframe
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/server/protocol_handler.py
ProtocolHandler.handle
def handle(self, message, connection): ''' Delegate a received message to the appropriate handler. Args: message (Message) : The message that was receive that needs to be handled connection (ServerConnection) : The connection that received this m...
python
def handle(self, message, connection): ''' Delegate a received message to the appropriate handler. Args: message (Message) : The message that was receive that needs to be handled connection (ServerConnection) : The connection that received this m...
[ "def", "handle", "(", "self", ",", "message", ",", "connection", ")", ":", "handler", "=", "self", ".", "_handlers", ".", "get", "(", "(", "message", ".", "msgtype", ",", "message", ".", "revision", ")", ")", "if", "handler", "is", "None", ":", "hand...
Delegate a received message to the appropriate handler. Args: message (Message) : The message that was receive that needs to be handled connection (ServerConnection) : The connection that received this message Raises: ProtocolError
[ "Delegate", "a", "received", "message", "to", "the", "appropriate", "handler", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/protocol_handler.py#L76-L105
train
Delegate a received message to the appropriate handler.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/server/session.py
_needs_document_lock
def _needs_document_lock(func): '''Decorator that adds the necessary locking and post-processing to manipulate the session's document. Expects to decorate a method on ServerSession and transforms it into a coroutine if it wasn't already. ''' @gen.coroutine def _needs_document_lock_w...
python
def _needs_document_lock(func): '''Decorator that adds the necessary locking and post-processing to manipulate the session's document. Expects to decorate a method on ServerSession and transforms it into a coroutine if it wasn't already. ''' @gen.coroutine def _needs_document_lock_w...
[ "def", "_needs_document_lock", "(", "func", ")", ":", "@", "gen", ".", "coroutine", "def", "_needs_document_lock_wrapper", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# while we wait for and hold the lock, prevent the session", "# from being dis...
Decorator that adds the necessary locking and post-processing to manipulate the session's document. Expects to decorate a method on ServerSession and transforms it into a coroutine if it wasn't already.
[ "Decorator", "that", "adds", "the", "necessary", "locking", "and", "post", "-", "processing", "to", "manipulate", "the", "session", "s", "document", ".", "Expects", "to", "decorate", "a", "method", "on", "ServerSession", "and", "transforms", "it", "into", "a",...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/session.py#L47-L82
train
Decorator that adds the necessary locking and post - processing to manipulate the session s document. Expects to decorate a coroutine a method on ServerSession.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
bokeh/bokeh
bokeh/server/session.py
ServerSession.unsubscribe
def unsubscribe(self, connection): """This should only be called by ``ServerConnection.unsubscribe_session`` or our book-keeping will be broken""" self._subscribed_connections.discard(connection) self._last_unsubscribe_time = current_time()
python
def unsubscribe(self, connection): """This should only be called by ``ServerConnection.unsubscribe_session`` or our book-keeping will be broken""" self._subscribed_connections.discard(connection) self._last_unsubscribe_time = current_time()
[ "def", "unsubscribe", "(", "self", ",", "connection", ")", ":", "self", ".", "_subscribed_connections", ".", "discard", "(", "connection", ")", "self", ".", "_last_unsubscribe_time", "=", "current_time", "(", ")" ]
This should only be called by ``ServerConnection.unsubscribe_session`` or our book-keeping will be broken
[ "This", "should", "only", "be", "called", "by", "ServerConnection", ".", "unsubscribe_session", "or", "our", "book", "-", "keeping", "will", "be", "broken" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/session.py#L175-L178
train
Unsubscribe from a connection
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.set_cwd
def set_cwd(self, dirname): """Set shell current working directory.""" # Replace single for double backslashes on Windows if os.name == 'nt': dirname = dirname.replace(u"\\", u"\\\\") if not self.external_kernel: code = u"get_ipython().kernel.set_cwd(u'''{}''')"....
python
def set_cwd(self, dirname): """Set shell current working directory.""" # Replace single for double backslashes on Windows if os.name == 'nt': dirname = dirname.replace(u"\\", u"\\\\") if not self.external_kernel: code = u"get_ipython().kernel.set_cwd(u'''{}''')"....
[ "def", "set_cwd", "(", "self", ",", "dirname", ")", ":", "# Replace single for double backslashes on Windows", "if", "os", ".", "name", "==", "'nt'", ":", "dirname", "=", "dirname", ".", "replace", "(", "u\"\\\\\"", ",", "u\"\\\\\\\\\"", ")", "if", "not", "sel...
Set shell current working directory.
[ "Set", "shell", "current", "working", "directory", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L110-L122
train
Set shell current working directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.set_bracket_matcher_color_scheme
def set_bracket_matcher_color_scheme(self, color_scheme): """Set color scheme for matched parentheses.""" bsh = sh.BaseSH(parent=self, color_scheme=color_scheme) mpcolor = bsh.get_matched_p_color() self._bracket_matcher.format.setBackground(mpcolor)
python
def set_bracket_matcher_color_scheme(self, color_scheme): """Set color scheme for matched parentheses.""" bsh = sh.BaseSH(parent=self, color_scheme=color_scheme) mpcolor = bsh.get_matched_p_color() self._bracket_matcher.format.setBackground(mpcolor)
[ "def", "set_bracket_matcher_color_scheme", "(", "self", ",", "color_scheme", ")", ":", "bsh", "=", "sh", ".", "BaseSH", "(", "parent", "=", "self", ",", "color_scheme", "=", "color_scheme", ")", "mpcolor", "=", "bsh", ".", "get_matched_p_color", "(", ")", "s...
Set color scheme for matched parentheses.
[ "Set", "color", "scheme", "for", "matched", "parentheses", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L136-L140
train
Set color scheme for matched parentheses.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.set_color_scheme
def set_color_scheme(self, color_scheme, reset=True): """Set color scheme of the shell.""" self.set_bracket_matcher_color_scheme(color_scheme) self.style_sheet, dark_color = create_qss_style(color_scheme) self.syntax_style = color_scheme self._style_sheet_changed() self._...
python
def set_color_scheme(self, color_scheme, reset=True): """Set color scheme of the shell.""" self.set_bracket_matcher_color_scheme(color_scheme) self.style_sheet, dark_color = create_qss_style(color_scheme) self.syntax_style = color_scheme self._style_sheet_changed() self._...
[ "def", "set_color_scheme", "(", "self", ",", "color_scheme", ",", "reset", "=", "True", ")", ":", "self", ".", "set_bracket_matcher_color_scheme", "(", "color_scheme", ")", "self", ".", "style_sheet", ",", "dark_color", "=", "create_qss_style", "(", "color_scheme"...
Set color scheme of the shell.
[ "Set", "color", "scheme", "of", "the", "shell", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L142-L154
train
Sets the color scheme of the shell.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.long_banner
def long_banner(self): """Banner for IPython widgets with pylab message""" # Default banner try: from IPython.core.usage import quick_guide except Exception: quick_guide = '' banner_parts = [ 'Python %s\n' % self.interpreter_versions['python_ve...
python
def long_banner(self): """Banner for IPython widgets with pylab message""" # Default banner try: from IPython.core.usage import quick_guide except Exception: quick_guide = '' banner_parts = [ 'Python %s\n' % self.interpreter_versions['python_ve...
[ "def", "long_banner", "(", "self", ")", ":", "# Default banner", "try", ":", "from", "IPython", ".", "core", ".", "usage", "import", "quick_guide", "except", "Exception", ":", "quick_guide", "=", "''", "banner_parts", "=", "[", "'Python %s\\n'", "%", "self", ...
Banner for IPython widgets with pylab message
[ "Banner", "for", "IPython", "widgets", "with", "pylab", "message" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L173-L217
train
Return a long banner for IPython widgets with pylab message
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.reset_namespace
def reset_namespace(self, warning=False, message=False): """Reset the namespace by removing all names defined by the user.""" reset_str = _("Remove all variables") warn_str = _("All user-defined variables will be removed. " "Are you sure you want to proceed?") kernel...
python
def reset_namespace(self, warning=False, message=False): """Reset the namespace by removing all names defined by the user.""" reset_str = _("Remove all variables") warn_str = _("All user-defined variables will be removed. " "Are you sure you want to proceed?") kernel...
[ "def", "reset_namespace", "(", "self", ",", "warning", "=", "False", ",", "message", "=", "False", ")", ":", "reset_str", "=", "_", "(", "\"Remove all variables\"", ")", "warn_str", "=", "_", "(", "\"All user-defined variables will be removed. \"", "\"Are you sure y...
Reset the namespace by removing all names defined by the user.
[ "Reset", "the", "namespace", "by", "removing", "all", "names", "defined", "by", "the", "user", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L237-L294
train
Reset the namespace by removing all names defined by the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.create_shortcuts
def create_shortcuts(self): """Create shortcuts for ipyconsole.""" inspect = config_shortcut(self._control.inspect_current_object, context='Console', name='Inspect current object', parent=self) clear_console = config_shortcut(se...
python
def create_shortcuts(self): """Create shortcuts for ipyconsole.""" inspect = config_shortcut(self._control.inspect_current_object, context='Console', name='Inspect current object', parent=self) clear_console = config_shortcut(se...
[ "def", "create_shortcuts", "(", "self", ")", ":", "inspect", "=", "config_shortcut", "(", "self", ".", "_control", ".", "inspect_current_object", ",", "context", "=", "'Console'", ",", "name", "=", "'Inspect current object'", ",", "parent", "=", "self", ")", "...
Create shortcuts for ipyconsole.
[ "Create", "shortcuts", "for", "ipyconsole", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L296-L323
train
Create shortcuts for ipyconsole.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.silent_execute
def silent_execute(self, code): """Execute code in the kernel without increasing the prompt""" try: self.kernel_client.execute(to_text_string(code), silent=True) except AttributeError: pass
python
def silent_execute(self, code): """Execute code in the kernel without increasing the prompt""" try: self.kernel_client.execute(to_text_string(code), silent=True) except AttributeError: pass
[ "def", "silent_execute", "(", "self", ",", "code", ")", ":", "try", ":", "self", ".", "kernel_client", ".", "execute", "(", "to_text_string", "(", "code", ")", ",", "silent", "=", "True", ")", "except", "AttributeError", ":", "pass" ]
Execute code in the kernel without increasing the prompt
[ "Execute", "code", "in", "the", "kernel", "without", "increasing", "the", "prompt" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L326-L331
train
Execute code in the kernel without increasing the prompt
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.silent_exec_method
def silent_exec_method(self, code): """Silently execute a kernel method and save its reply The methods passed here **don't** involve getting the value of a variable but instead replies that can be handled by ast.literal_eval. To get a value see `get_value` Parameters ...
python
def silent_exec_method(self, code): """Silently execute a kernel method and save its reply The methods passed here **don't** involve getting the value of a variable but instead replies that can be handled by ast.literal_eval. To get a value see `get_value` Parameters ...
[ "def", "silent_exec_method", "(", "self", ",", "code", ")", ":", "# Generate uuid, which would be used as an indication of whether or", "# not the unique request originated from here", "local_uuid", "=", "to_text_string", "(", "uuid", ".", "uuid1", "(", ")", ")", "code", "=...
Silently execute a kernel method and save its reply The methods passed here **don't** involve getting the value of a variable but instead replies that can be handled by ast.literal_eval. To get a value see `get_value` Parameters ---------- code : string ...
[ "Silently", "execute", "a", "kernel", "method", "and", "save", "its", "reply" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L333-L368
train
Silently execute a kernel method and save its reply to the request_info dictionary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.handle_exec_method
def handle_exec_method(self, msg): """ Handle data returned by silent executions of kernel methods This is based on the _handle_exec_callback of RichJupyterWidget. Therefore this is licensed BSD. """ user_exp = msg['content'].get('user_expressions') if not user_e...
python
def handle_exec_method(self, msg): """ Handle data returned by silent executions of kernel methods This is based on the _handle_exec_callback of RichJupyterWidget. Therefore this is licensed BSD. """ user_exp = msg['content'].get('user_expressions') if not user_e...
[ "def", "handle_exec_method", "(", "self", ",", "msg", ")", ":", "user_exp", "=", "msg", "[", "'content'", "]", ".", "get", "(", "'user_expressions'", ")", "if", "not", "user_exp", ":", "return", "for", "expression", "in", "user_exp", ":", "if", "expression...
Handle data returned by silent executions of kernel methods This is based on the _handle_exec_callback of RichJupyterWidget. Therefore this is licensed BSD.
[ "Handle", "data", "returned", "by", "silent", "executions", "of", "kernel", "methods" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L370-L433
train
Handle kernel methods and kernel reply messages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.set_backend_for_mayavi
def set_backend_for_mayavi(self, command): """ Mayavi plots require the Qt backend, so we try to detect if one is generated to change backends """ calling_mayavi = False lines = command.splitlines() for l in lines: if not l.startswith('#'): ...
python
def set_backend_for_mayavi(self, command): """ Mayavi plots require the Qt backend, so we try to detect if one is generated to change backends """ calling_mayavi = False lines = command.splitlines() for l in lines: if not l.startswith('#'): ...
[ "def", "set_backend_for_mayavi", "(", "self", ",", "command", ")", ":", "calling_mayavi", "=", "False", "lines", "=", "command", ".", "splitlines", "(", ")", "for", "l", "in", "lines", ":", "if", "not", "l", ".", "startswith", "(", "'#'", ")", ":", "if...
Mayavi plots require the Qt backend, so we try to detect if one is generated to change backends
[ "Mayavi", "plots", "require", "the", "Qt", "backend", "so", "we", "try", "to", "detect", "if", "one", "is", "generated", "to", "change", "backends" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L435-L450
train
This function is called when the user wants to change the backend for Mayavi plots.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.change_mpl_backend
def change_mpl_backend(self, command): """ If the user is trying to change Matplotlib backends with %matplotlib, send the same command again to the kernel to correctly change it. Fixes issue 4002 """ if command.startswith('%matplotlib') and \ len(comman...
python
def change_mpl_backend(self, command): """ If the user is trying to change Matplotlib backends with %matplotlib, send the same command again to the kernel to correctly change it. Fixes issue 4002 """ if command.startswith('%matplotlib') and \ len(comman...
[ "def", "change_mpl_backend", "(", "self", ",", "command", ")", ":", "if", "command", ".", "startswith", "(", "'%matplotlib'", ")", "and", "len", "(", "command", ".", "splitlines", "(", ")", ")", "==", "1", ":", "if", "not", "'inline'", "in", "command", ...
If the user is trying to change Matplotlib backends with %matplotlib, send the same command again to the kernel to correctly change it. Fixes issue 4002
[ "If", "the", "user", "is", "trying", "to", "change", "Matplotlib", "backends", "with", "%matplotlib", "send", "the", "same", "command", "again", "to", "the", "kernel", "to", "correctly", "change", "it", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L452-L463
train
Send a command to the kernel to change the local version of the MPL backend.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget._context_menu_make
def _context_menu_make(self, pos): """Reimplement the IPython context menu""" menu = super(ShellWidget, self)._context_menu_make(pos) return self.ipyclient.add_actions_to_context_menu(menu)
python
def _context_menu_make(self, pos): """Reimplement the IPython context menu""" menu = super(ShellWidget, self)._context_menu_make(pos) return self.ipyclient.add_actions_to_context_menu(menu)
[ "def", "_context_menu_make", "(", "self", ",", "pos", ")", ":", "menu", "=", "super", "(", "ShellWidget", ",", "self", ")", ".", "_context_menu_make", "(", "pos", ")", "return", "self", ".", "ipyclient", ".", "add_actions_to_context_menu", "(", "menu", ")" ]
Reimplement the IPython context menu
[ "Reimplement", "the", "IPython", "context", "menu" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L473-L476
train
Reimplement the IPython context menu
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget._banner_default
def _banner_default(self): """ Reimplement banner creation to let the user decide if he wants a banner or not """ # Don't change banner for external kernels if self.external_kernel: return '' show_banner_o = self.additional_options['show_banner'] ...
python
def _banner_default(self): """ Reimplement banner creation to let the user decide if he wants a banner or not """ # Don't change banner for external kernels if self.external_kernel: return '' show_banner_o = self.additional_options['show_banner'] ...
[ "def", "_banner_default", "(", "self", ")", ":", "# Don't change banner for external kernels", "if", "self", ".", "external_kernel", ":", "return", "''", "show_banner_o", "=", "self", ".", "additional_options", "[", "'show_banner'", "]", "if", "show_banner_o", ":", ...
Reimplement banner creation to let the user decide if he wants a banner or not
[ "Reimplement", "banner", "creation", "to", "let", "the", "user", "decide", "if", "he", "wants", "a", "banner", "or", "not" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L478-L490
train
Return the default banner for the current locale.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget._syntax_style_changed
def _syntax_style_changed(self): """Refresh the highlighting with the current syntax style by class.""" if self._highlighter is None: # ignore premature calls return if self.syntax_style: self._highlighter._style = create_style_class(self.syntax_style) ...
python
def _syntax_style_changed(self): """Refresh the highlighting with the current syntax style by class.""" if self._highlighter is None: # ignore premature calls return if self.syntax_style: self._highlighter._style = create_style_class(self.syntax_style) ...
[ "def", "_syntax_style_changed", "(", "self", ")", ":", "if", "self", ".", "_highlighter", "is", "None", ":", "# ignore premature calls", "return", "if", "self", ".", "syntax_style", ":", "self", ".", "_highlighter", ".", "_style", "=", "create_style_class", "(",...
Refresh the highlighting with the current syntax style by class.
[ "Refresh", "the", "highlighting", "with", "the", "current", "syntax", "style", "by", "class", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L496-L505
train
Refresh the highlighting with the current syntax style by class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget._prompt_started_hook
def _prompt_started_hook(self): """Emit a signal when the prompt is ready.""" if not self._reading: self._highlighter.highlighting_on = True self.sig_prompt_ready.emit()
python
def _prompt_started_hook(self): """Emit a signal when the prompt is ready.""" if not self._reading: self._highlighter.highlighting_on = True self.sig_prompt_ready.emit()
[ "def", "_prompt_started_hook", "(", "self", ")", ":", "if", "not", "self", ".", "_reading", ":", "self", ".", "_highlighter", ".", "highlighting_on", "=", "True", "self", ".", "sig_prompt_ready", ".", "emit", "(", ")" ]
Emit a signal when the prompt is ready.
[ "Emit", "a", "signal", "when", "the", "prompt", "is", "ready", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L507-L511
train
Emit a signal when the prompt is ready.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.focusInEvent
def focusInEvent(self, event): """Reimplement Qt method to send focus change notification""" self.focus_changed.emit() return super(ShellWidget, self).focusInEvent(event)
python
def focusInEvent(self, event): """Reimplement Qt method to send focus change notification""" self.focus_changed.emit() return super(ShellWidget, self).focusInEvent(event)
[ "def", "focusInEvent", "(", "self", ",", "event", ")", ":", "self", ".", "focus_changed", ".", "emit", "(", ")", "return", "super", "(", "ShellWidget", ",", "self", ")", ".", "focusInEvent", "(", "event", ")" ]
Reimplement Qt method to send focus change notification
[ "Reimplement", "Qt", "method", "to", "send", "focus", "change", "notification" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L514-L517
train
Reimplement Qt method to send focus change notification
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/shell.py
ShellWidget.focusOutEvent
def focusOutEvent(self, event): """Reimplement Qt method to send focus change notification""" self.focus_changed.emit() return super(ShellWidget, self).focusOutEvent(event)
python
def focusOutEvent(self, event): """Reimplement Qt method to send focus change notification""" self.focus_changed.emit() return super(ShellWidget, self).focusOutEvent(event)
[ "def", "focusOutEvent", "(", "self", ",", "event", ")", ":", "self", ".", "focus_changed", ".", "emit", "(", ")", "return", "super", "(", "ShellWidget", ",", "self", ")", ".", "focusOutEvent", "(", "event", ")" ]
Reimplement Qt method to send focus change notification
[ "Reimplement", "Qt", "method", "to", "send", "focus", "change", "notification" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/shell.py#L519-L522
train
Reimplement Qt method to send focus change notification
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.register
def register(self, panel, position=Panel.Position.LEFT): """ Installs a panel on the editor. :param panel: Panel to install :param position: Position where the panel must be installed. :return: The installed panel """ assert panel is not None pos_to_strin...
python
def register(self, panel, position=Panel.Position.LEFT): """ Installs a panel on the editor. :param panel: Panel to install :param position: Position where the panel must be installed. :return: The installed panel """ assert panel is not None pos_to_strin...
[ "def", "register", "(", "self", ",", "panel", ",", "position", "=", "Panel", ".", "Position", ".", "LEFT", ")", ":", "assert", "panel", "is", "not", "None", "pos_to_string", "=", "{", "Panel", ".", "Position", ".", "BOTTOM", ":", "'bottom'", ",", "Pane...
Installs a panel on the editor. :param panel: Panel to install :param position: Position where the panel must be installed. :return: The installed panel
[ "Installs", "a", "panel", "on", "the", "editor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L58-L81
train
Registers a panel at the specified position.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.remove
def remove(self, name_or_klass): """ Removes the specified panel. :param name_or_klass: Name or class of the panel to remove. :return: The removed panel """ logger.debug('removing panel %s' % name_or_klass) panel = self.get(name_or_klass) panel.on_uninsta...
python
def remove(self, name_or_klass): """ Removes the specified panel. :param name_or_klass: Name or class of the panel to remove. :return: The removed panel """ logger.debug('removing panel %s' % name_or_klass) panel = self.get(name_or_klass) panel.on_uninsta...
[ "def", "remove", "(", "self", ",", "name_or_klass", ")", ":", "logger", ".", "debug", "(", "'removing panel %s'", "%", "name_or_klass", ")", "panel", "=", "self", ".", "get", "(", "name_or_klass", ")", "panel", ".", "on_uninstall", "(", ")", "panel", ".", ...
Removes the specified panel. :param name_or_klass: Name or class of the panel to remove. :return: The removed panel
[ "Removes", "the", "specified", "panel", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L83-L95
train
Removes the specified panel from the cache.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.clear
def clear(self): """Removes all panel from the CodeEditor.""" for i in range(4): while len(self._panels[i]): key = sorted(list(self._panels[i].keys()))[0] panel = self.remove(key) panel.setParent(None) panel.deleteLater()
python
def clear(self): """Removes all panel from the CodeEditor.""" for i in range(4): while len(self._panels[i]): key = sorted(list(self._panels[i].keys()))[0] panel = self.remove(key) panel.setParent(None) panel.deleteLater()
[ "def", "clear", "(", "self", ")", ":", "for", "i", "in", "range", "(", "4", ")", ":", "while", "len", "(", "self", ".", "_panels", "[", "i", "]", ")", ":", "key", "=", "sorted", "(", "list", "(", "self", ".", "_panels", "[", "i", "]", ".", ...
Removes all panel from the CodeEditor.
[ "Removes", "all", "panel", "from", "the", "CodeEditor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L97-L104
train
Removes all panels from the CodeEditor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.get
def get(self, name_or_klass): """ Gets a specific panel instance. :param name_or_klass: Name or class of the panel to retrieve. :return: The specified panel instance. """ if not is_text_string(name_or_klass): name_or_klass = name_or_klass.__name__ for...
python
def get(self, name_or_klass): """ Gets a specific panel instance. :param name_or_klass: Name or class of the panel to retrieve. :return: The specified panel instance. """ if not is_text_string(name_or_klass): name_or_klass = name_or_klass.__name__ for...
[ "def", "get", "(", "self", ",", "name_or_klass", ")", ":", "if", "not", "is_text_string", "(", "name_or_klass", ")", ":", "name_or_klass", "=", "name_or_klass", ".", "__name__", "for", "zone", "in", "range", "(", "4", ")", ":", "try", ":", "panel", "=", ...
Gets a specific panel instance. :param name_or_klass: Name or class of the panel to retrieve. :return: The specified panel instance.
[ "Gets", "a", "specific", "panel", "instance", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L106-L122
train
Gets a specific panel instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.refresh
def refresh(self): """Refreshes the editor panels (resize and update margins).""" logger.debug('Refresh panels') self.resize() self._update(self.editor.contentsRect(), 0, force_update_margins=True)
python
def refresh(self): """Refreshes the editor panels (resize and update margins).""" logger.debug('Refresh panels') self.resize() self._update(self.editor.contentsRect(), 0, force_update_margins=True)
[ "def", "refresh", "(", "self", ")", ":", "logger", ".", "debug", "(", "'Refresh panels'", ")", "self", ".", "resize", "(", ")", "self", ".", "_update", "(", "self", ".", "editor", ".", "contentsRect", "(", ")", ",", "0", ",", "force_update_margins", "=...
Refreshes the editor panels (resize and update margins).
[ "Refreshes", "the", "editor", "panels", "(", "resize", "and", "update", "margins", ")", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L156-L161
train
Refreshes the editor panels
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.resize
def resize(self): """Resizes panels.""" crect = self.editor.contentsRect() view_crect = self.editor.viewport().contentsRect() s_bottom, s_left, s_right, s_top = self._compute_zones_sizes() tw = s_left + s_right th = s_bottom + s_top w_offset = crect.width() - (vie...
python
def resize(self): """Resizes panels.""" crect = self.editor.contentsRect() view_crect = self.editor.viewport().contentsRect() s_bottom, s_left, s_right, s_top = self._compute_zones_sizes() tw = s_left + s_right th = s_bottom + s_top w_offset = crect.width() - (vie...
[ "def", "resize", "(", "self", ")", ":", "crect", "=", "self", ".", "editor", ".", "contentsRect", "(", ")", "view_crect", "=", "self", ".", "editor", ".", "viewport", "(", ")", ".", "contentsRect", "(", ")", "s_bottom", ",", "s_left", ",", "s_right", ...
Resizes panels.
[ "Resizes", "panels", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L163-L222
train
Resizes panels.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager.update_floating_panels
def update_floating_panels(self): """Update foating panels.""" crect = self.editor.contentsRect() panels = self.panels_for_zone(Panel.Position.FLOATING) for panel in panels: if not panel.isVisible(): continue panel.set_geometry(crect)
python
def update_floating_panels(self): """Update foating panels.""" crect = self.editor.contentsRect() panels = self.panels_for_zone(Panel.Position.FLOATING) for panel in panels: if not panel.isVisible(): continue panel.set_geometry(crect)
[ "def", "update_floating_panels", "(", "self", ")", ":", "crect", "=", "self", ".", "editor", ".", "contentsRect", "(", ")", "panels", "=", "self", ".", "panels_for_zone", "(", "Panel", ".", "Position", ".", "FLOATING", ")", "for", "panel", "in", "panels", ...
Update foating panels.
[ "Update", "foating", "panels", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L224-L231
train
Update foating panels.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager._update_viewport_margins
def _update_viewport_margins(self): """Update viewport margins.""" top = 0 left = 0 right = 0 bottom = 0 for panel in self.panels_for_zone(Panel.Position.LEFT): if panel.isVisible(): width = panel.sizeHint().width() left += widt...
python
def _update_viewport_margins(self): """Update viewport margins.""" top = 0 left = 0 right = 0 bottom = 0 for panel in self.panels_for_zone(Panel.Position.LEFT): if panel.isVisible(): width = panel.sizeHint().width() left += widt...
[ "def", "_update_viewport_margins", "(", "self", ")", ":", "top", "=", "0", "left", "=", "0", "right", "=", "0", "bottom", "=", "0", "for", "panel", "in", "self", ".", "panels_for_zone", "(", "Panel", ".", "Position", ".", "LEFT", ")", ":", "if", "pan...
Update viewport margins.
[ "Update", "viewport", "margins", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L255-L278
train
Update viewport margins.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/manager.py
PanelsManager._compute_zones_sizes
def _compute_zones_sizes(self): """Compute panel zone sizes.""" # Left panels left = 0 for panel in self.panels_for_zone(Panel.Position.LEFT): if not panel.isVisible(): continue size_hint = panel.sizeHint() left += size_hint.width() ...
python
def _compute_zones_sizes(self): """Compute panel zone sizes.""" # Left panels left = 0 for panel in self.panels_for_zone(Panel.Position.LEFT): if not panel.isVisible(): continue size_hint = panel.sizeHint() left += size_hint.width() ...
[ "def", "_compute_zones_sizes", "(", "self", ")", ":", "# Left panels", "left", "=", "0", "for", "panel", "in", "self", ".", "panels_for_zone", "(", "Panel", ".", "Position", ".", "LEFT", ")", ":", "if", "not", "panel", ".", "isVisible", "(", ")", ":", ...
Compute panel zone sizes.
[ "Compute", "panel", "zone", "sizes", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/manager.py#L291-L323
train
Compute panel zone sizes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
python_like_mod_finder
def python_like_mod_finder(import_line, alt_path=None, stop_token=None): """ Locate a module path based on an import line in an python-like file import_line is the line of source code containing the import alt_path specifies an alternate base path for the module st...
python
def python_like_mod_finder(import_line, alt_path=None, stop_token=None): """ Locate a module path based on an import line in an python-like file import_line is the line of source code containing the import alt_path specifies an alternate base path for the module st...
[ "def", "python_like_mod_finder", "(", "import_line", ",", "alt_path", "=", "None", ",", "stop_token", "=", "None", ")", ":", "if", "stop_token", "and", "'.'", "in", "stop_token", ":", "stop_token", "=", "stop_token", ".", "split", "(", "'.'", ")", "[", "-"...
Locate a module path based on an import line in an python-like file import_line is the line of source code containing the import alt_path specifies an alternate base path for the module stop_token specifies the desired name to stop on This is used to a find the path to python-like modules (...
[ "Locate", "a", "module", "path", "based", "on", "an", "import", "line", "in", "an", "python", "-", "like", "file", "import_line", "is", "the", "line", "of", "source", "code", "containing", "the", "import", "alt_path", "specifies", "an", "alternate", "base", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L148-L198
train
Find a python - like module path based on an import line.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
get_definition_with_regex
def get_definition_with_regex(source, token, start_line=-1): """ Find the definition of an object within a source closest to a given line """ if not token: return None if DEBUG_EDITOR: t0 = time.time() patterns = [ # python / cython keyword definitions r...
python
def get_definition_with_regex(source, token, start_line=-1): """ Find the definition of an object within a source closest to a given line """ if not token: return None if DEBUG_EDITOR: t0 = time.time() patterns = [ # python / cython keyword definitions r...
[ "def", "get_definition_with_regex", "(", "source", ",", "token", ",", "start_line", "=", "-", "1", ")", ":", "if", "not", "token", ":", "return", "None", "if", "DEBUG_EDITOR", ":", "t0", "=", "time", ".", "time", "(", ")", "patterns", "=", "[", "# pyth...
Find the definition of an object within a source closest to a given line
[ "Find", "the", "definition", "of", "an", "object", "within", "a", "source", "closest", "to", "a", "given", "line" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L201-L247
train
Find the definition of an object within a source closest to a given line
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
python_like_exts
def python_like_exts(): """Return a list of all python-like extensions""" exts = [] for lang in languages.PYTHON_LIKE_LANGUAGES: exts.extend(list(languages.ALL_LANGUAGES[lang])) return ['.' + ext for ext in exts]
python
def python_like_exts(): """Return a list of all python-like extensions""" exts = [] for lang in languages.PYTHON_LIKE_LANGUAGES: exts.extend(list(languages.ALL_LANGUAGES[lang])) return ['.' + ext for ext in exts]
[ "def", "python_like_exts", "(", ")", ":", "exts", "=", "[", "]", "for", "lang", "in", "languages", ".", "PYTHON_LIKE_LANGUAGES", ":", "exts", ".", "extend", "(", "list", "(", "languages", ".", "ALL_LANGUAGES", "[", "lang", "]", ")", ")", "return", "[", ...
Return a list of all python-like extensions
[ "Return", "a", "list", "of", "all", "python", "-", "like", "extensions" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L265-L270
train
Returns a list of all python - like extensions
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
all_editable_exts
def all_editable_exts(): """Return a list of all editable extensions""" exts = [] for (language, extensions) in languages.ALL_LANGUAGES.items(): exts.extend(list(extensions)) return ['.' + ext for ext in exts]
python
def all_editable_exts(): """Return a list of all editable extensions""" exts = [] for (language, extensions) in languages.ALL_LANGUAGES.items(): exts.extend(list(extensions)) return ['.' + ext for ext in exts]
[ "def", "all_editable_exts", "(", ")", ":", "exts", "=", "[", "]", "for", "(", "language", ",", "extensions", ")", "in", "languages", ".", "ALL_LANGUAGES", ".", "items", "(", ")", ":", "exts", ".", "extend", "(", "list", "(", "extensions", ")", ")", "...
Return a list of all editable extensions
[ "Return", "a", "list", "of", "all", "editable", "extensions" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L273-L278
train
Return a list of all editable extensions
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
_complete_path
def _complete_path(path=None): """Perform completion of filesystem path. https://stackoverflow.com/questions/5637124/tab-completion-in-pythons-raw-input """ if not path: return _listdir('.') dirname, rest = os.path.split(path) tmp = dirname if dirname else '.' res = [p for p ...
python
def _complete_path(path=None): """Perform completion of filesystem path. https://stackoverflow.com/questions/5637124/tab-completion-in-pythons-raw-input """ if not path: return _listdir('.') dirname, rest = os.path.split(path) tmp = dirname if dirname else '.' res = [p for p ...
[ "def", "_complete_path", "(", "path", "=", "None", ")", ":", "if", "not", "path", ":", "return", "_listdir", "(", "'.'", ")", "dirname", ",", "rest", "=", "os", ".", "path", ".", "split", "(", "path", ")", "tmp", "=", "dirname", "if", "dirname", "e...
Perform completion of filesystem path. https://stackoverflow.com/questions/5637124/tab-completion-in-pythons-raw-input
[ "Perform", "completion", "of", "filesystem", "path", ".", "https", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "5637124", "/", "tab", "-", "completion", "-", "in", "-", "pythons", "-", "raw", "-", "input" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L296-L312
train
Perform completion of filesystem path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
FallbackPlugin.get_completions
def get_completions(self, info): """Return a list of (completion, type) tuples Simple completion based on python-like identifiers and whitespace """ if not info['obj']: return items = [] obj = info['obj'] if info['context']: lexe...
python
def get_completions(self, info): """Return a list of (completion, type) tuples Simple completion based on python-like identifiers and whitespace """ if not info['obj']: return items = [] obj = info['obj'] if info['context']: lexe...
[ "def", "get_completions", "(", "self", ",", "info", ")", ":", "if", "not", "info", "[", "'obj'", "]", ":", "return", "items", "=", "[", "]", "obj", "=", "info", "[", "'obj'", "]", "if", "info", "[", "'context'", "]", ":", "lexer", "=", "find_lexer_...
Return a list of (completion, type) tuples Simple completion based on python-like identifiers and whitespace
[ "Return", "a", "list", "of", "(", "completion", "type", ")", "tuples", "Simple", "completion", "based", "on", "python", "-", "like", "identifiers", "and", "whitespace" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L37-L79
train
Return a list of tuples of completion type and token matches based on python - like identifiers and whitespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
FallbackPlugin.get_definition
def get_definition(self, info): """ Find the definition for an object within a set of source code This is used to find the path of python-like modules (e.g. cython and enaml) for a goto definition """ if not info['is_python_like']: return tok...
python
def get_definition(self, info): """ Find the definition for an object within a set of source code This is used to find the path of python-like modules (e.g. cython and enaml) for a goto definition """ if not info['is_python_like']: return tok...
[ "def", "get_definition", "(", "self", ",", "info", ")", ":", "if", "not", "info", "[", "'is_python_like'", "]", ":", "return", "token", "=", "info", "[", "'obj'", "]", "lines", "=", "info", "[", "'lines'", "]", "source_code", "=", "info", "[", "'source...
Find the definition for an object within a set of source code This is used to find the path of python-like modules (e.g. cython and enaml) for a goto definition
[ "Find", "the", "definition", "for", "an", "object", "within", "a", "set", "of", "source", "code", "This", "is", "used", "to", "find", "the", "path", "of", "python", "-", "like", "modules", "(", "e", ".", "g", ".", "cython", "and", "enaml", ")", "for"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L81-L127
train
Find the definition for an object within a set of source code
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/utils/introspection/fallback_plugin.py
FallbackPlugin.get_info
def get_info(self, info): """Get a formatted calltip and docstring from Fallback""" if info['docstring']: if info['filename']: filename = os.path.basename(info['filename']) filename = os.path.splitext(filename)[0] else: filen...
python
def get_info(self, info): """Get a formatted calltip and docstring from Fallback""" if info['docstring']: if info['filename']: filename = os.path.basename(info['filename']) filename = os.path.splitext(filename)[0] else: filen...
[ "def", "get_info", "(", "self", ",", "info", ")", ":", "if", "info", "[", "'docstring'", "]", ":", "if", "info", "[", "'filename'", "]", ":", "filename", "=", "os", ".", "path", ".", "basename", "(", "info", "[", "'filename'", "]", ")", "filename", ...
Get a formatted calltip and docstring from Fallback
[ "Get", "a", "formatted", "calltip", "and", "docstring", "from", "Fallback" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/introspection/fallback_plugin.py#L129-L144
train
Get a formatted calltip and docstring from Fallback
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/variableexplorer/widgets/objecteditor.py
create_dialog
def create_dialog(obj, obj_name): """Creates the editor dialog and returns a tuple (dialog, func) where func is the function to be called with the dialog instance as argument, after quitting the dialog box The role of this intermediate function is to allow easy monkey-patching. (uschmitt...
python
def create_dialog(obj, obj_name): """Creates the editor dialog and returns a tuple (dialog, func) where func is the function to be called with the dialog instance as argument, after quitting the dialog box The role of this intermediate function is to allow easy monkey-patching. (uschmitt...
[ "def", "create_dialog", "(", "obj", ",", "obj_name", ")", ":", "# Local import\r", "from", "spyder_kernels", ".", "utils", ".", "nsview", "import", "(", "ndarray", ",", "FakeObject", ",", "Image", ",", "is_known_type", ",", "DataFrame", ",", "Series", ")", "...
Creates the editor dialog and returns a tuple (dialog, func) where func is the function to be called with the dialog instance as argument, after quitting the dialog box The role of this intermediate function is to allow easy monkey-patching. (uschmitt suggested this indirection here so that h...
[ "Creates", "the", "editor", "dialog", "and", "returns", "a", "tuple", "(", "dialog", "func", ")", "where", "func", "is", "the", "function", "to", "be", "called", "with", "the", "dialog", "instance", "as", "argument", "after", "quitting", "the", "dialog", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/objecteditor.py#L51-L103
train
Creates the editor dialog and returns a tuple of dialog and func
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/variableexplorer/widgets/objecteditor.py
oedit
def oedit(obj, modal=True, namespace=None): """Edit the object 'obj' in a GUI-based editor and return the edited copy (if Cancel is pressed, return None) The object 'obj' is a container Supported container types: dict, list, set, tuple, str/unicode or numpy.array (instantiate...
python
def oedit(obj, modal=True, namespace=None): """Edit the object 'obj' in a GUI-based editor and return the edited copy (if Cancel is pressed, return None) The object 'obj' is a container Supported container types: dict, list, set, tuple, str/unicode or numpy.array (instantiate...
[ "def", "oedit", "(", "obj", ",", "modal", "=", "True", ",", "namespace", "=", "None", ")", ":", "# Local import\r", "from", "spyder", ".", "utils", ".", "qthelpers", "import", "qapplication", "app", "=", "qapplication", "(", ")", "if", "modal", ":", "obj...
Edit the object 'obj' in a GUI-based editor and return the edited copy (if Cancel is pressed, return None) The object 'obj' is a container Supported container types: dict, list, set, tuple, str/unicode or numpy.array (instantiate a new QApplication if necessary, so it can be ...
[ "Edit", "the", "object", "obj", "in", "a", "GUI", "-", "based", "editor", "and", "return", "the", "edited", "copy", "(", "if", "Cancel", "is", "pressed", "return", "None", ")", "The", "object", "obj", "is", "a", "container", "Supported", "container", "ty...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/objecteditor.py#L106-L146
train
Edit the object obj in a GUI - based editor and return the edited copy
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
get_item_children
def get_item_children(item): """Return a sorted list of all the children items of 'item'.""" children = [item.child(index) for index in range(item.childCount())] for child in children[:]: others = get_item_children(child) if others is not None: children += others retur...
python
def get_item_children(item): """Return a sorted list of all the children items of 'item'.""" children = [item.child(index) for index in range(item.childCount())] for child in children[:]: others = get_item_children(child) if others is not None: children += others retur...
[ "def", "get_item_children", "(", "item", ")", ":", "children", "=", "[", "item", ".", "child", "(", "index", ")", "for", "index", "in", "range", "(", "item", ".", "childCount", "(", ")", ")", "]", "for", "child", "in", "children", "[", ":", "]", ":...
Return a sorted list of all the children items of 'item'.
[ "Return", "a", "sorted", "list", "of", "all", "the", "children", "items", "of", "item", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L121-L128
train
Return a sorted list of all the children items of item.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
item_at_line
def item_at_line(root_item, line): """ Find and return the item of the outline explorer under which is located the specified 'line' of the editor. """ previous_item = root_item item = root_item for item in get_item_children(root_item): if item.line > line: return...
python
def item_at_line(root_item, line): """ Find and return the item of the outline explorer under which is located the specified 'line' of the editor. """ previous_item = root_item item = root_item for item in get_item_children(root_item): if item.line > line: return...
[ "def", "item_at_line", "(", "root_item", ",", "line", ")", ":", "previous_item", "=", "root_item", "item", "=", "root_item", "for", "item", "in", "get_item_children", "(", "root_item", ")", ":", "if", "item", ".", "line", ">", "line", ":", "return", "previ...
Find and return the item of the outline explorer under which is located the specified 'line' of the editor.
[ "Find", "and", "return", "the", "item", "of", "the", "outline", "explorer", "under", "which", "is", "located", "the", "specified", "line", "of", "the", "editor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L131-L143
train
Find and return the item that is located at the specified line
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.get_actions_from_items
def get_actions_from_items(self, items): """Reimplemented OneColumnTree method""" fromcursor_act = create_action(self, text=_('Go to cursor position'), icon=ima.icon('fromcursor'), triggered=self.go_to_cursor_position) ...
python
def get_actions_from_items(self, items): """Reimplemented OneColumnTree method""" fromcursor_act = create_action(self, text=_('Go to cursor position'), icon=ima.icon('fromcursor'), triggered=self.go_to_cursor_position) ...
[ "def", "get_actions_from_items", "(", "self", ",", "items", ")", ":", "fromcursor_act", "=", "create_action", "(", "self", ",", "text", "=", "_", "(", "'Go to cursor position'", ")", ",", "icon", "=", "ima", ".", "icon", "(", "'fromcursor'", ")", ",", "tri...
Reimplemented OneColumnTree method
[ "Reimplemented", "OneColumnTree", "method" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L183-L207
train
Reimplemented OneColumnTree method
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.__hide_or_show_root_items
def __hide_or_show_root_items(self, item): """ show_all_files option is disabled: hide all root items except *item* show_all_files option is enabled: do nothing """ for _it in self.get_top_level_items(): _it.setHidden(_it is not item and not self.show_all_files)
python
def __hide_or_show_root_items(self, item): """ show_all_files option is disabled: hide all root items except *item* show_all_files option is enabled: do nothing """ for _it in self.get_top_level_items(): _it.setHidden(_it is not item and not self.show_all_files)
[ "def", "__hide_or_show_root_items", "(", "self", ",", "item", ")", ":", "for", "_it", "in", "self", ".", "get_top_level_items", "(", ")", ":", "_it", ".", "setHidden", "(", "_it", "is", "not", "item", "and", "not", "self", ".", "show_all_files", ")" ]
show_all_files option is disabled: hide all root items except *item* show_all_files option is enabled: do nothing
[ "show_all_files", "option", "is", "disabled", ":", "hide", "all", "root", "items", "except", "*", "item", "*", "show_all_files", "option", "is", "enabled", ":", "do", "nothing" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L216-L222
train
hide or show all items except item
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.set_current_editor
def set_current_editor(self, editor, update): """Bind editor instance""" editor_id = editor.get_id() if editor_id in list(self.editor_ids.values()): item = self.editor_items[editor_id] if not self.freeze: self.scrollToItem(item) self...
python
def set_current_editor(self, editor, update): """Bind editor instance""" editor_id = editor.get_id() if editor_id in list(self.editor_ids.values()): item = self.editor_items[editor_id] if not self.freeze: self.scrollToItem(item) self...
[ "def", "set_current_editor", "(", "self", ",", "editor", ",", "update", ")", ":", "editor_id", "=", "editor", ".", "get_id", "(", ")", "if", "editor_id", "in", "list", "(", "self", ".", "editor_ids", ".", "values", "(", ")", ")", ":", "item", "=", "s...
Bind editor instance
[ "Bind", "editor", "instance" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L267-L294
train
Bind editor instance to current state
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.file_renamed
def file_renamed(self, editor, new_filename): """File was renamed, updating outline explorer tree""" if editor is None: # This is needed when we can't find an editor to attach # the outline explorer to. # Fix issue 8813 return editor_id = ed...
python
def file_renamed(self, editor, new_filename): """File was renamed, updating outline explorer tree""" if editor is None: # This is needed when we can't find an editor to attach # the outline explorer to. # Fix issue 8813 return editor_id = ed...
[ "def", "file_renamed", "(", "self", ",", "editor", ",", "new_filename", ")", ":", "if", "editor", "is", "None", ":", "# This is needed when we can't find an editor to attach\r", "# the outline explorer to.\r", "# Fix issue 8813\r", "return", "editor_id", "=", "editor", "....
File was renamed, updating outline explorer tree
[ "File", "was", "renamed", "updating", "outline", "explorer", "tree" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L296-L307
train
Update the outline explorer tree with the new filename
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.set_editor_ids_order
def set_editor_ids_order(self, ordered_editor_ids): """ Order the root file items in the Outline Explorer following the provided list of editor ids. """ if self.ordered_editor_ids != ordered_editor_ids: self.ordered_editor_ids = ordered_editor_ids i...
python
def set_editor_ids_order(self, ordered_editor_ids): """ Order the root file items in the Outline Explorer following the provided list of editor ids. """ if self.ordered_editor_ids != ordered_editor_ids: self.ordered_editor_ids = ordered_editor_ids i...
[ "def", "set_editor_ids_order", "(", "self", ",", "ordered_editor_ids", ")", ":", "if", "self", ".", "ordered_editor_ids", "!=", "ordered_editor_ids", ":", "self", ".", "ordered_editor_ids", "=", "ordered_editor_ids", "if", "self", ".", "sort_files_alphabetically", "is...
Order the root file items in the Outline Explorer following the provided list of editor ids.
[ "Order", "the", "root", "file", "items", "in", "the", "Outline", "Explorer", "following", "the", "provided", "list", "of", "editor", "ids", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L333-L341
train
Order the root file items in the Outline Explorer following the list of editor ids.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.__sort_toplevel_items
def __sort_toplevel_items(self): """ Sort the root file items in alphabetical order if 'sort_files_alphabetically' is True, else order the items as specified in the 'self.ordered_editor_ids' list. """ if self.show_all_files is False: return c...
python
def __sort_toplevel_items(self): """ Sort the root file items in alphabetical order if 'sort_files_alphabetically' is True, else order the items as specified in the 'self.ordered_editor_ids' list. """ if self.show_all_files is False: return c...
[ "def", "__sort_toplevel_items", "(", "self", ")", ":", "if", "self", ".", "show_all_files", "is", "False", ":", "return", "current_ordered_items", "=", "[", "self", ".", "topLevelItem", "(", "index", ")", "for", "index", "in", "range", "(", "self", ".", "t...
Sort the root file items in alphabetical order if 'sort_files_alphabetically' is True, else order the items as specified in the 'self.ordered_editor_ids' list.
[ "Sort", "the", "root", "file", "items", "in", "alphabetical", "order", "if", "sort_files_alphabetically", "is", "True", "else", "order", "the", "items", "as", "specified", "in", "the", "self", ".", "ordered_editor_ids", "list", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L343-L374
train
Sort the items in alphabetical order.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.populate_branch
def populate_branch(self, editor, root_item, tree_cache=None): """ Generates an outline of the editor's content and stores the result in a cache. """ if tree_cache is None: tree_cache = {} # Removing cached items for which line is > total line...
python
def populate_branch(self, editor, root_item, tree_cache=None): """ Generates an outline of the editor's content and stores the result in a cache. """ if tree_cache is None: tree_cache = {} # Removing cached items for which line is > total line...
[ "def", "populate_branch", "(", "self", ",", "editor", ",", "root_item", ",", "tree_cache", "=", "None", ")", ":", "if", "tree_cache", "is", "None", ":", "tree_cache", "=", "{", "}", "# Removing cached items for which line is > total line nb\r", "for", "_l", "in", ...
Generates an outline of the editor's content and stores the result in a cache.
[ "Generates", "an", "outline", "of", "the", "editor", "s", "content", "and", "stores", "the", "result", "in", "a", "cache", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L376-L528
train
Populate the tree cache with the contents of the given root item.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.root_item_selected
def root_item_selected(self, item): """Root item has been selected: expanding it and collapsing others""" if self.show_all_files: return for root_item in self.get_top_level_items(): if root_item is item: self.expandItem(root_item) else: ...
python
def root_item_selected(self, item): """Root item has been selected: expanding it and collapsing others""" if self.show_all_files: return for root_item in self.get_top_level_items(): if root_item is item: self.expandItem(root_item) else: ...
[ "def", "root_item_selected", "(", "self", ",", "item", ")", ":", "if", "self", ".", "show_all_files", ":", "return", "for", "root_item", "in", "self", ".", "get_top_level_items", "(", ")", ":", "if", "root_item", "is", "item", ":", "self", ".", "expandItem...
Root item has been selected: expanding it and collapsing others
[ "Root", "item", "has", "been", "selected", ":", "expanding", "it", "and", "collapsing", "others" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L530-L538
train
Collapse the root item and all its children
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.restore
def restore(self): """Reimplemented OneColumnTree method""" if self.current_editor is not None: self.collapseAll() editor_id = self.editor_ids[self.current_editor] self.root_item_selected(self.editor_items[editor_id])
python
def restore(self): """Reimplemented OneColumnTree method""" if self.current_editor is not None: self.collapseAll() editor_id = self.editor_ids[self.current_editor] self.root_item_selected(self.editor_items[editor_id])
[ "def", "restore", "(", "self", ")", ":", "if", "self", ".", "current_editor", "is", "not", "None", ":", "self", ".", "collapseAll", "(", ")", "editor_id", "=", "self", ".", "editor_ids", "[", "self", ".", "current_editor", "]", "self", ".", "root_item_se...
Reimplemented OneColumnTree method
[ "Reimplemented", "OneColumnTree", "method" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L540-L545
train
Reimplemented OneColumnTree method
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.get_root_item
def get_root_item(self, item): """Return the root item of the specified item.""" root_item = item while isinstance(root_item.parent(), QTreeWidgetItem): root_item = root_item.parent() return root_item
python
def get_root_item(self, item): """Return the root item of the specified item.""" root_item = item while isinstance(root_item.parent(), QTreeWidgetItem): root_item = root_item.parent() return root_item
[ "def", "get_root_item", "(", "self", ",", "item", ")", ":", "root_item", "=", "item", "while", "isinstance", "(", "root_item", ".", "parent", "(", ")", ",", "QTreeWidgetItem", ")", ":", "root_item", "=", "root_item", ".", "parent", "(", ")", "return", "r...
Return the root item of the specified item.
[ "Return", "the", "root", "item", "of", "the", "specified", "item", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L547-L552
train
Return the root item of the specified item.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.get_visible_items
def get_visible_items(self): """Return a list of all visible items in the treewidget.""" items = [] iterator = QTreeWidgetItemIterator(self) while iterator.value(): item = iterator.value() if not item.isHidden(): if item.parent(): ...
python
def get_visible_items(self): """Return a list of all visible items in the treewidget.""" items = [] iterator = QTreeWidgetItemIterator(self) while iterator.value(): item = iterator.value() if not item.isHidden(): if item.parent(): ...
[ "def", "get_visible_items", "(", "self", ")", ":", "items", "=", "[", "]", "iterator", "=", "QTreeWidgetItemIterator", "(", "self", ")", "while", "iterator", ".", "value", "(", ")", ":", "item", "=", "iterator", ".", "value", "(", ")", "if", "not", "it...
Return a list of all visible items in the treewidget.
[ "Return", "a", "list", "of", "all", "visible", "items", "in", "the", "treewidget", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L554-L567
train
Return a list of all visible items in the treewidget.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.activated
def activated(self, item): """Double-click event""" editor_item = self.editor_items.get( self.editor_ids.get(self.current_editor)) line = 0 if item == editor_item: line = 1 elif isinstance(item, TreeItem): line = item.line se...
python
def activated(self, item): """Double-click event""" editor_item = self.editor_items.get( self.editor_ids.get(self.current_editor)) line = 0 if item == editor_item: line = 1 elif isinstance(item, TreeItem): line = item.line se...
[ "def", "activated", "(", "self", ",", "item", ")", ":", "editor_item", "=", "self", ".", "editor_items", ".", "get", "(", "self", ".", "editor_ids", ".", "get", "(", "self", ".", "current_editor", ")", ")", "line", "=", "0", "if", "item", "==", "edit...
Double-click event
[ "Double", "-", "click", "event" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L569-L594
train
Double - click event
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerTreeWidget.clicked
def clicked(self, item): """Click event""" if isinstance(item, FileRootItem): self.root_item_selected(item) self.activated(item)
python
def clicked(self, item): """Click event""" if isinstance(item, FileRootItem): self.root_item_selected(item) self.activated(item)
[ "def", "clicked", "(", "self", ",", "item", ")", ":", "if", "isinstance", "(", "item", ",", "FileRootItem", ")", ":", "self", ".", "root_item_selected", "(", "item", ")", "self", ".", "activated", "(", "item", ")" ]
Click event
[ "Click", "event" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L596-L600
train
Click event handler
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerWidget.setup_buttons
def setup_buttons(self): """Setup the buttons of the outline explorer widget toolbar.""" self.fromcursor_btn = create_toolbutton( self, icon=ima.icon('fromcursor'), tip=_('Go to cursor position'), triggered=self.treewidget.go_to_cursor_position) buttons = [self.fro...
python
def setup_buttons(self): """Setup the buttons of the outline explorer widget toolbar.""" self.fromcursor_btn = create_toolbutton( self, icon=ima.icon('fromcursor'), tip=_('Go to cursor position'), triggered=self.treewidget.go_to_cursor_position) buttons = [self.fro...
[ "def", "setup_buttons", "(", "self", ")", ":", "self", ".", "fromcursor_btn", "=", "create_toolbutton", "(", "self", ",", "icon", "=", "ima", ".", "icon", "(", "'fromcursor'", ")", ",", "tip", "=", "_", "(", "'Go to cursor position'", ")", ",", "triggered"...
Setup the buttons of the outline explorer widget toolbar.
[ "Setup", "the", "buttons", "of", "the", "outline", "explorer", "widget", "toolbar", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L650-L664
train
Setup the buttons of the outline explorer widget toolbar.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/outlineexplorer/widgets.py
OutlineExplorerWidget.get_options
def get_options(self): """ Return outline explorer options """ return dict( show_fullpath=self.treewidget.show_fullpath, show_all_files=self.treewidget.show_all_files, group_cells=self.treewidget.group_cells, show_comments=self.tree...
python
def get_options(self): """ Return outline explorer options """ return dict( show_fullpath=self.treewidget.show_fullpath, show_all_files=self.treewidget.show_all_files, group_cells=self.treewidget.group_cells, show_comments=self.tree...
[ "def", "get_options", "(", "self", ")", ":", "return", "dict", "(", "show_fullpath", "=", "self", ".", "treewidget", ".", "show_fullpath", ",", "show_all_files", "=", "self", ".", "treewidget", ".", "show_all_files", ",", "group_cells", "=", "self", ".", "tr...
Return outline explorer options
[ "Return", "outline", "explorer", "options" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/outlineexplorer/widgets.py#L675-L689
train
Returns the options of the outline explorer
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/api/editorextension.py
EditorExtension.on_uninstall
def on_uninstall(self): """Uninstalls the editor extension from the editor.""" self._on_close = True self.enabled = False self._editor = None
python
def on_uninstall(self): """Uninstalls the editor extension from the editor.""" self._on_close = True self.enabled = False self._editor = None
[ "def", "on_uninstall", "(", "self", ")", ":", "self", ".", "_on_close", "=", "True", "self", ".", "enabled", "=", "False", "self", ".", "_editor", "=", "None" ]
Uninstalls the editor extension from the editor.
[ "Uninstalls", "the", "editor", "extension", "from", "the", "editor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/api/editorextension.py#L112-L116
train
Uninstalls the editor extension from the editor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/__init__.py
add_to_distribution
def add_to_distribution(dist): """Add package to py2exe/cx_Freeze distribution object Extension to guidata.disthelpers""" try: dist.add_qt_bindings() except AttributeError: raise ImportError("This script requires guidata 1.5+") for _modname in ('spyder', 'spyderplugins'): dis...
python
def add_to_distribution(dist): """Add package to py2exe/cx_Freeze distribution object Extension to guidata.disthelpers""" try: dist.add_qt_bindings() except AttributeError: raise ImportError("This script requires guidata 1.5+") for _modname in ('spyder', 'spyderplugins'): dis...
[ "def", "add_to_distribution", "(", "dist", ")", ":", "try", ":", "dist", ".", "add_qt_bindings", "(", ")", "except", "AttributeError", ":", "raise", "ImportError", "(", "\"This script requires guidata 1.5+\"", ")", "for", "_modname", "in", "(", "'spyder'", ",", ...
Add package to py2exe/cx_Freeze distribution object Extension to guidata.disthelpers
[ "Add", "package", "to", "py2exe", "/", "cx_Freeze", "distribution", "object", "Extension", "to", "guidata", ".", "disthelpers" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/__init__.py#L52-L64
train
Add package to py2exe distribution object Extension to guidata. disthelpers
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/__init__.py
get_versions
def get_versions(reporev=True): """Get version information for components used by Spyder""" import sys import platform import qtpy import qtpy.QtCore revision = None if reporev: from spyder.utils import vcs revision, branch = vcs.get_git_revision(os.path.dirname(__dir__)) ...
python
def get_versions(reporev=True): """Get version information for components used by Spyder""" import sys import platform import qtpy import qtpy.QtCore revision = None if reporev: from spyder.utils import vcs revision, branch = vcs.get_git_revision(os.path.dirname(__dir__)) ...
[ "def", "get_versions", "(", "reporev", "=", "True", ")", ":", "import", "sys", "import", "platform", "import", "qtpy", "import", "qtpy", ".", "QtCore", "revision", "=", "None", "if", "reporev", ":", "from", "spyder", ".", "utils", "import", "vcs", "revisio...
Get version information for components used by Spyder
[ "Get", "version", "information", "for", "components", "used", "by", "Spyder" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/__init__.py#L67-L95
train
Get version information for Spyder components used by Spyder
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...