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/util/paths.py
bokehjsdir
def bokehjsdir(dev=False): """ Get the location of the bokehjs source files. If dev is True, the files in bokehjs/build are preferred. Otherwise uses the files in bokeh/server/static. """ dir1 = join(ROOT_DIR, '..', 'bokehjs', 'build') dir2 = join(serverdir(), 'static') if dev and isdir(dir1...
python
def bokehjsdir(dev=False): """ Get the location of the bokehjs source files. If dev is True, the files in bokehjs/build are preferred. Otherwise uses the files in bokeh/server/static. """ dir1 = join(ROOT_DIR, '..', 'bokehjs', 'build') dir2 = join(serverdir(), 'static') if dev and isdir(dir1...
[ "def", "bokehjsdir", "(", "dev", "=", "False", ")", ":", "dir1", "=", "join", "(", "ROOT_DIR", ",", "'..'", ",", "'bokehjs'", ",", "'build'", ")", "dir2", "=", "join", "(", "serverdir", "(", ")", ",", "'static'", ")", "if", "dev", "and", "isdir", "...
Get the location of the bokehjs source files. If dev is True, the files in bokehjs/build are preferred. Otherwise uses the files in bokeh/server/static.
[ "Get", "the", "location", "of", "the", "bokehjs", "source", "files", ".", "If", "dev", "is", "True", "the", "files", "in", "bokehjs", "/", "build", "are", "preferred", ".", "Otherwise", "uses", "the", "files", "in", "bokeh", "/", "server", "/", "static",...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/paths.py#L53-L63
train
Get the location of the bokehjs source files.
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/server.py
BaseServer.start
def start(self): ''' Install the Bokeh Server and its background tasks on a Tornado ``IOLoop``. This method does *not* block and does *not* affect the state of the Tornado ``IOLoop`` You must start and stop the loop yourself, i.e. this method is typically useful when you are al...
python
def start(self): ''' Install the Bokeh Server and its background tasks on a Tornado ``IOLoop``. This method does *not* block and does *not* affect the state of the Tornado ``IOLoop`` You must start and stop the loop yourself, i.e. this method is typically useful when you are al...
[ "def", "start", "(", "self", ")", ":", "assert", "not", "self", ".", "_started", ",", "\"Already started\"", "self", ".", "_started", "=", "True", "self", ".", "_tornado", ".", "start", "(", ")" ]
Install the Bokeh Server and its background tasks on a Tornado ``IOLoop``. This method does *not* block and does *not* affect the state of the Tornado ``IOLoop`` You must start and stop the loop yourself, i.e. this method is typically useful when you are already explicitly mana...
[ "Install", "the", "Bokeh", "Server", "and", "its", "background", "tasks", "on", "a", "Tornado", "IOLoop", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/server.py#L120-L135
train
Start the Bokeh Server and its background tasks on a Tornado .
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/server.py
BaseServer.stop
def stop(self, wait=True): ''' Stop the Bokeh Server. This stops and removes all Bokeh Server ``IOLoop`` callbacks, as well as stops the ``HTTPServer`` that this instance was configured with. Args: fast (bool): Whether to wait for orderly cleanup (default: T...
python
def stop(self, wait=True): ''' Stop the Bokeh Server. This stops and removes all Bokeh Server ``IOLoop`` callbacks, as well as stops the ``HTTPServer`` that this instance was configured with. Args: fast (bool): Whether to wait for orderly cleanup (default: T...
[ "def", "stop", "(", "self", ",", "wait", "=", "True", ")", ":", "assert", "not", "self", ".", "_stopped", ",", "\"Already stopped\"", "self", ".", "_stopped", "=", "True", "self", ".", "_tornado", ".", "stop", "(", "wait", ")", "self", ".", "_http", ...
Stop the Bokeh Server. This stops and removes all Bokeh Server ``IOLoop`` callbacks, as well as stops the ``HTTPServer`` that this instance was configured with. Args: fast (bool): Whether to wait for orderly cleanup (default: True) Returns: None
[ "Stop", "the", "Bokeh", "Server", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/server.py#L137-L154
train
Stop the Bokeh Server. This stops the HTTP Server and Tornado callbacks as well as the HTTP Server callbacks as well as the HTTP Server that this instance was configured with.
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/server.py
BaseServer.run_until_shutdown
def run_until_shutdown(self): ''' Run the Bokeh Server until shutdown is requested by the user, either via a Keyboard interrupt (Ctrl-C) or SIGTERM. Calling this method will start the Tornado ``IOLoop`` and block all execution in the calling process. Returns: None ...
python
def run_until_shutdown(self): ''' Run the Bokeh Server until shutdown is requested by the user, either via a Keyboard interrupt (Ctrl-C) or SIGTERM. Calling this method will start the Tornado ``IOLoop`` and block all execution in the calling process. Returns: None ...
[ "def", "run_until_shutdown", "(", "self", ")", ":", "if", "not", "self", ".", "_started", ":", "self", ".", "start", "(", ")", "# Install shutdown hooks", "atexit", ".", "register", "(", "self", ".", "_atexit", ")", "signal", ".", "signal", "(", "signal", ...
Run the Bokeh Server until shutdown is requested by the user, either via a Keyboard interrupt (Ctrl-C) or SIGTERM. Calling this method will start the Tornado ``IOLoop`` and block all execution in the calling process. Returns: None
[ "Run", "the", "Bokeh", "Server", "until", "shutdown", "is", "requested", "by", "the", "user", "either", "via", "a", "Keyboard", "interrupt", "(", "Ctrl", "-", "C", ")", "or", "SIGTERM", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/server.py#L167-L187
train
Run the Bokeh Server until shutdown is requested 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/server/server.py
BaseServer.get_sessions
def get_sessions(self, app_path=None): ''' Gets all currently active sessions for applications. Args: app_path (str, optional) : The configured application path for the application to return sessions for. If None, return active sessions for all ...
python
def get_sessions(self, app_path=None): ''' Gets all currently active sessions for applications. Args: app_path (str, optional) : The configured application path for the application to return sessions for. If None, return active sessions for all ...
[ "def", "get_sessions", "(", "self", ",", "app_path", "=", "None", ")", ":", "if", "app_path", "is", "not", "None", ":", "return", "self", ".", "_tornado", ".", "get_sessions", "(", "app_path", ")", "all_sessions", "=", "[", "]", "for", "path", "in", "s...
Gets all currently active sessions for applications. Args: app_path (str, optional) : The configured application path for the application to return sessions for. If None, return active sessions for all applications. (default: None) Returns: ...
[ "Gets", "all", "currently", "active", "sessions", "for", "applications", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/server.py#L206-L224
train
Gets all currently active sessions for applications.
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/server.py
BaseServer.show
def show(self, app_path, browser=None, new='tab'): ''' Opens an app in a browser window or tab. This method is useful for testing or running Bokeh server applications on a local machine but should not call when running Bokeh server for an actual deployment. Args: ap...
python
def show(self, app_path, browser=None, new='tab'): ''' Opens an app in a browser window or tab. This method is useful for testing or running Bokeh server applications on a local machine but should not call when running Bokeh server for an actual deployment. Args: ap...
[ "def", "show", "(", "self", ",", "app_path", ",", "browser", "=", "None", ",", "new", "=", "'tab'", ")", ":", "if", "not", "app_path", ".", "startswith", "(", "\"/\"", ")", ":", "raise", "ValueError", "(", "\"app_path must start with a /\"", ")", "address_...
Opens an app in a browser window or tab. This method is useful for testing or running Bokeh server applications on a local machine but should not call when running Bokeh server for an actual deployment. Args: app_path (str) : the app path to open The part of...
[ "Opens", "an", "app", "in", "a", "browser", "window", "or", "tab", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/server.py#L226-L261
train
Opens an app in a browser window or tab.
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/code_runner.py
CodeRunner.new_module
def new_module(self): ''' Make a fresh module to run in. Returns: Module ''' self.reset_run_errors() if self._code is None: return None module_name = 'bk_script_' + make_id().replace('-', '') module = ModuleType(str(module_name)) # str ...
python
def new_module(self): ''' Make a fresh module to run in. Returns: Module ''' self.reset_run_errors() if self._code is None: return None module_name = 'bk_script_' + make_id().replace('-', '') module = ModuleType(str(module_name)) # str ...
[ "def", "new_module", "(", "self", ")", ":", "self", ".", "reset_run_errors", "(", ")", "if", "self", ".", "_code", "is", "None", ":", "return", "None", "module_name", "=", "'bk_script_'", "+", "make_id", "(", ")", ".", "replace", "(", "'-'", ",", "''",...
Make a fresh module to run in. Returns: Module
[ "Make", "a", "fresh", "module", "to", "run", "in", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/application/handlers/code_runner.py#L129-L145
train
Make a fresh module to run in.
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/code_runner.py
CodeRunner.run
def run(self, module, post_check): ''' Execute the configured source code in a module and run any post checks. Args: module (Module) : a module to execute the configured code in. post_check(callable) : a function that can raise an exception if expected p...
python
def run(self, module, post_check): ''' Execute the configured source code in a module and run any post checks. Args: module (Module) : a module to execute the configured code in. post_check(callable) : a function that can raise an exception if expected p...
[ "def", "run", "(", "self", ",", "module", ",", "post_check", ")", ":", "try", ":", "# Simulate the sys.path behaviour decribed here:", "#", "# https://docs.python.org/2/library/sys.html#sys.path", "_cwd", "=", "os", ".", "getcwd", "(", ")", "_sys_path", "=", "list", ...
Execute the configured source code in a module and run any post checks. Args: module (Module) : a module to execute the configured code in. post_check(callable) : a function that can raise an exception if expected post-conditions are not met after code execution...
[ "Execute", "the", "configured", "source", "code", "in", "a", "module", "and", "run", "any", "post", "checks", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/application/handlers/code_runner.py#L158-L196
train
Execute the configured source code in a module and run any post - conditions.
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/connection.py
ClientConnection.loop_until_closed
def loop_until_closed(self): ''' Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHLY DISCOURAGED for any re...
python
def loop_until_closed(self): ''' Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHLY DISCOURAGED for any re...
[ "def", "loop_until_closed", "(", "self", ")", ":", "if", "isinstance", "(", "self", ".", "_state", ",", "NOT_YET_CONNECTED", ")", ":", "# we don't use self._transition_to_disconnected here", "# because _transition is a coroutine", "self", ".", "_tell_session_about_disconnect"...
Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHLY DISCOURAGED for any real use case.
[ "Execute", "a", "blocking", "loop", "that", "runs", "and", "executes", "event", "callbacks", "until", "the", "connection", "is", "closed", "(", "e", ".", "g", ".", "by", "hitting", "Ctrl", "-", "C", ")", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/connection.py#L134-L151
train
Execute a blocking loop that runs and executes event callbacks until the connection is closed.
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/connection.py
ClientConnection.pull_doc
def pull_doc(self, document): ''' Pull a document from the server, overwriting the passed-in document Args: document : (Document) The document to overwrite with server content. Returns: None ''' msg = self._protocol.create('PULL-DOC-REQ') ...
python
def pull_doc(self, document): ''' Pull a document from the server, overwriting the passed-in document Args: document : (Document) The document to overwrite with server content. Returns: None ''' msg = self._protocol.create('PULL-DOC-REQ') ...
[ "def", "pull_doc", "(", "self", ",", "document", ")", ":", "msg", "=", "self", ".", "_protocol", ".", "create", "(", "'PULL-DOC-REQ'", ")", "reply", "=", "self", ".", "_send_message_wait_for_reply", "(", "msg", ")", "if", "reply", "is", "None", ":", "rai...
Pull a document from the server, overwriting the passed-in document Args: document : (Document) The document to overwrite with server content. Returns: None
[ "Pull", "a", "document", "from", "the", "server", "overwriting", "the", "passed", "-", "in", "document" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/connection.py#L153-L171
train
Pull a document from the server overwriting the passed - in document AttributeNames
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/connection.py
ClientConnection.push_doc
def push_doc(self, document): ''' Push a document to the server, overwriting any existing server-side doc. Args: document : (Document) A Document to push to the server Returns: The server reply ''' msg = self._protocol.create('PUSH-DOC',...
python
def push_doc(self, document): ''' Push a document to the server, overwriting any existing server-side doc. Args: document : (Document) A Document to push to the server Returns: The server reply ''' msg = self._protocol.create('PUSH-DOC',...
[ "def", "push_doc", "(", "self", ",", "document", ")", ":", "msg", "=", "self", ".", "_protocol", ".", "create", "(", "'PUSH-DOC'", ",", "document", ")", "reply", "=", "self", ".", "_send_message_wait_for_reply", "(", "msg", ")", "if", "reply", "is", "Non...
Push a document to the server, overwriting any existing server-side doc. Args: document : (Document) A Document to push to the server Returns: The server reply
[ "Push", "a", "document", "to", "the", "server", "overwriting", "any", "existing", "server", "-", "side", "doc", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/connection.py#L173-L191
train
Push a document to the server overwriting any existing server - side 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/client/connection.py
ClientConnection.request_server_info
def request_server_info(self): ''' Ask for information about the server. Returns: A dictionary of server attributes. ''' if self._server_info is None: self._server_info = self._send_request_server_info() return self._server_info
python
def request_server_info(self): ''' Ask for information about the server. Returns: A dictionary of server attributes. ''' if self._server_info is None: self._server_info = self._send_request_server_info() return self._server_info
[ "def", "request_server_info", "(", "self", ")", ":", "if", "self", ".", "_server_info", "is", "None", ":", "self", ".", "_server_info", "=", "self", ".", "_send_request_server_info", "(", ")", "return", "self", ".", "_server_info" ]
Ask for information about the server. Returns: A dictionary of server attributes.
[ "Ask", "for", "information", "about", "the", "server", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/connection.py#L193-L202
train
Ask for information about the server.
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/export.py
export_png
def export_png(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the ``LayoutDOM`` object or document as a PNG. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.png``) Args: obj (LayoutDOM or D...
python
def export_png(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the ``LayoutDOM`` object or document as a PNG. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.png``) Args: obj (LayoutDOM or D...
[ "def", "export_png", "(", "obj", ",", "filename", "=", "None", ",", "height", "=", "None", ",", "width", "=", "None", ",", "webdriver", "=", "None", ",", "timeout", "=", "5", ")", ":", "image", "=", "get_screenshot_as_png", "(", "obj", ",", "height", ...
Export the ``LayoutDOM`` object or document as a PNG. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.png``) Args: obj (LayoutDOM or Document) : a Layout (Row/Column), Plot or Widget object or Document to export. ...
[ "Export", "the", "LayoutDOM", "object", "or", "document", "as", "a", "PNG", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/io/export.py#L59-L107
train
Export the LayoutDOM object or document as a PNG.
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/export.py
export_svgs
def export_svgs(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the SVG-enabled plots within a layout. Each plot will result in a distinct SVG file. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.sv...
python
def export_svgs(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the SVG-enabled plots within a layout. Each plot will result in a distinct SVG file. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.sv...
[ "def", "export_svgs", "(", "obj", ",", "filename", "=", "None", ",", "height", "=", "None", ",", "width", "=", "None", ",", "webdriver", "=", "None", ",", "timeout", "=", "5", ")", ":", "svgs", "=", "get_svgs", "(", "obj", ",", "height", "=", "heig...
Export the SVG-enabled plots within a layout. Each plot will result in a distinct SVG file. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.svg``) Args: obj (LayoutDOM object) : a Layout (Row/Column), Plot or Widget object to ...
[ "Export", "the", "SVG", "-", "enabled", "plots", "within", "a", "layout", ".", "Each", "plot", "will", "result", "in", "a", "distinct", "SVG", "file", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/io/export.py#L109-L166
train
Export the SVG - enabled plots within a layout.
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/export.py
get_screenshot_as_png
def get_screenshot_as_png(obj, driver=None, timeout=5, **kwargs): ''' Get a screenshot of a ``LayoutDOM`` object. Args: obj (LayoutDOM or Document) : a Layout (Row/Column), Plot or Widget object or Document to export. driver (selenium.webdriver) : a selenium webdriver instance to u...
python
def get_screenshot_as_png(obj, driver=None, timeout=5, **kwargs): ''' Get a screenshot of a ``LayoutDOM`` object. Args: obj (LayoutDOM or Document) : a Layout (Row/Column), Plot or Widget object or Document to export. driver (selenium.webdriver) : a selenium webdriver instance to u...
[ "def", "get_screenshot_as_png", "(", "obj", ",", "driver", "=", "None", ",", "timeout", "=", "5", ",", "*", "*", "kwargs", ")", ":", "Image", "=", "import_required", "(", "'PIL.Image'", ",", "'To use bokeh.io.export_png you need pillow '", "+", "'(\"conda install ...
Get a screenshot of a ``LayoutDOM`` object. Args: obj (LayoutDOM or Document) : a Layout (Row/Column), Plot or Widget object or Document to export. driver (selenium.webdriver) : a selenium webdriver instance to use to export the image. timeout (int) : the maximum a...
[ "Get", "a", "screenshot", "of", "a", "LayoutDOM", "object", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/io/export.py#L186-L234
train
Get a screenshot of a LayoutDOM 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/io/export.py
_crop_image
def _crop_image(image, left=0, top=0, right=0, bottom=0, **kwargs): ''' Crop the border from the layout ''' return image.crop((left, top, right, bottom))
python
def _crop_image(image, left=0, top=0, right=0, bottom=0, **kwargs): ''' Crop the border from the layout ''' return image.crop((left, top, right, bottom))
[ "def", "_crop_image", "(", "image", ",", "left", "=", "0", ",", "top", "=", "0", ",", "right", "=", "0", ",", "bottom", "=", "0", ",", "*", "*", "kwargs", ")", ":", "return", "image", ".", "crop", "(", "(", "left", ",", "top", ",", "right", "...
Crop the border from the layout
[ "Crop", "the", "border", "from", "the", "layout" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/io/export.py#L354-L358
train
Crops the border from the layout
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/sources.py
ColumnDataSource._data_from_df
def _data_from_df(df): ''' Create a ``dict`` of columns from a Pandas ``DataFrame``, suitable for creating a ColumnDataSource. Args: df (DataFrame) : data to convert Returns: dict[str, np.array] ''' _df = df.copy() # Flatten columns ...
python
def _data_from_df(df): ''' Create a ``dict`` of columns from a Pandas ``DataFrame``, suitable for creating a ColumnDataSource. Args: df (DataFrame) : data to convert Returns: dict[str, np.array] ''' _df = df.copy() # Flatten columns ...
[ "def", "_data_from_df", "(", "df", ")", ":", "_df", "=", "df", ".", "copy", "(", ")", "# Flatten columns", "if", "isinstance", "(", "df", ".", "columns", ",", "pd", ".", "MultiIndex", ")", ":", "try", ":", "_df", ".", "columns", "=", "[", "'_'", "....
Create a ``dict`` of columns from a Pandas ``DataFrame``, suitable for creating a ColumnDataSource. Args: df (DataFrame) : data to convert Returns: dict[str, np.array]
[ "Create", "a", "dict", "of", "columns", "from", "a", "Pandas", "DataFrame", "suitable", "for", "creating", "a", "ColumnDataSource", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L195-L232
train
Convert a Pandas DataFrame to a dict of columns suitable for creating a ColumnDataSource.
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/sources.py
ColumnDataSource._df_index_name
def _df_index_name(df): ''' Return the Bokeh-appropriate column name for a ``DataFrame`` index If there is no named index, then `"index" is returned. If there is a single named index, then ``df.index.name`` is returned. If there is a multi-index, and the index names are all strings, t...
python
def _df_index_name(df): ''' Return the Bokeh-appropriate column name for a ``DataFrame`` index If there is no named index, then `"index" is returned. If there is a single named index, then ``df.index.name`` is returned. If there is a multi-index, and the index names are all strings, t...
[ "def", "_df_index_name", "(", "df", ")", ":", "if", "df", ".", "index", ".", "name", ":", "return", "df", ".", "index", ".", "name", "elif", "df", ".", "index", ".", "names", ":", "try", ":", "return", "\"_\"", ".", "join", "(", "df", ".", "index...
Return the Bokeh-appropriate column name for a ``DataFrame`` index If there is no named index, then `"index" is returned. If there is a single named index, then ``df.index.name`` is returned. If there is a multi-index, and the index names are all strings, then the names are joined wit...
[ "Return", "the", "Bokeh", "-", "appropriate", "column", "name", "for", "a", "DataFrame", "index" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L252-L280
train
Return the Bokeh - appropriate column name for a DataFrame index
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/sources.py
ColumnDataSource.add
def add(self, data, name=None): ''' Appends a new column of data to the data source. Args: data (seq) : new data to add name (str, optional) : column name to use. If not supplied, generate a name of the form "Series ####" Returns: str: the c...
python
def add(self, data, name=None): ''' Appends a new column of data to the data source. Args: data (seq) : new data to add name (str, optional) : column name to use. If not supplied, generate a name of the form "Series ####" Returns: str: the c...
[ "def", "add", "(", "self", ",", "data", ",", "name", "=", "None", ")", ":", "if", "name", "is", "None", ":", "n", "=", "len", "(", "self", ".", "data", ")", "while", "\"Series %d\"", "%", "n", "in", "self", ".", "data", ":", "n", "+=", "1", "...
Appends a new column of data to the data source. Args: data (seq) : new data to add name (str, optional) : column name to use. If not supplied, generate a name of the form "Series ####" Returns: str: the column name used
[ "Appends", "a", "new", "column", "of", "data", "to", "the", "data", "source", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L325-L343
train
Adds a new column of data to the data source.
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/sources.py
ColumnDataSource.remove
def remove(self, name): ''' Remove a column of data. Args: name (str) : name of the column to remove Returns: None .. note:: If the column name does not exist, a warning is issued. ''' try: del self.data[name] ex...
python
def remove(self, name): ''' Remove a column of data. Args: name (str) : name of the column to remove Returns: None .. note:: If the column name does not exist, a warning is issued. ''' try: del self.data[name] ex...
[ "def", "remove", "(", "self", ",", "name", ")", ":", "try", ":", "del", "self", ".", "data", "[", "name", "]", "except", "(", "ValueError", ",", "KeyError", ")", ":", "import", "warnings", "warnings", ".", "warn", "(", "\"Unable to find column '%s' in data...
Remove a column of data. Args: name (str) : name of the column to remove Returns: None .. note:: If the column name does not exist, a warning is issued.
[ "Remove", "a", "column", "of", "data", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L346-L363
train
Removes a column of data.
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/sources.py
ColumnDataSource._stream
def _stream(self, new_data, rollover=None, setter=None): ''' Internal implementation to efficiently update data source columns with new append-only data. The internal implementation adds the setter attribute. [https://github.com/bokeh/bokeh/issues/6577] In cases where it is necessary t...
python
def _stream(self, new_data, rollover=None, setter=None): ''' Internal implementation to efficiently update data source columns with new append-only data. The internal implementation adds the setter attribute. [https://github.com/bokeh/bokeh/issues/6577] In cases where it is necessary t...
[ "def", "_stream", "(", "self", ",", "new_data", ",", "rollover", "=", "None", ",", "setter", "=", "None", ")", ":", "needs_length_check", "=", "True", "if", "pd", "and", "isinstance", "(", "new_data", ",", "pd", ".", "Series", ")", ":", "new_data", "="...
Internal implementation to efficiently update data source columns with new append-only data. The internal implementation adds the setter attribute. [https://github.com/bokeh/bokeh/issues/6577] In cases where it is necessary to update data columns in, this method can efficiently send on...
[ "Internal", "implementation", "to", "efficiently", "update", "data", "source", "columns", "with", "new", "append", "-", "only", "data", ".", "The", "internal", "implementation", "adds", "the", "setter", "attribute", ".", "[", "https", ":", "//", "github", ".",...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L407-L517
train
Stream the data from a Bokeh server application to a new set of 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/models/sources.py
ColumnDataSource.patch
def patch(self, patches, setter=None): ''' Efficiently update data source columns at specific locations If it is only necessary to update a small subset of data in a ``ColumnDataSource``, this method can be used to efficiently update only the subset, instead of requiring the entire data...
python
def patch(self, patches, setter=None): ''' Efficiently update data source columns at specific locations If it is only necessary to update a small subset of data in a ``ColumnDataSource``, this method can be used to efficiently update only the subset, instead of requiring the entire data...
[ "def", "patch", "(", "self", ",", "patches", ",", "setter", "=", "None", ")", ":", "import", "numpy", "as", "np", "extra", "=", "set", "(", "patches", ".", "keys", "(", ")", ")", "-", "set", "(", "self", ".", "data", ".", "keys", "(", ")", ")",...
Efficiently update data source columns at specific locations If it is only necessary to update a small subset of data in a ``ColumnDataSource``, this method can be used to efficiently update only the subset, instead of requiring the entire data set to be sent. This method should be pas...
[ "Efficiently", "update", "data", "source", "columns", "at", "specific", "locations" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/sources.py#L519-L674
train
Efficiently updates the data source columns at specific locations.
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/validation/check.py
silence
def silence(warning, silence=True): ''' Silence a particular warning on all Bokeh models. Args: warning (Warning) : Bokeh warning to silence silence (bool) : Whether or not to silence the warning Returns: A set containing the all silenced warnings This function adds or removes...
python
def silence(warning, silence=True): ''' Silence a particular warning on all Bokeh models. Args: warning (Warning) : Bokeh warning to silence silence (bool) : Whether or not to silence the warning Returns: A set containing the all silenced warnings This function adds or removes...
[ "def", "silence", "(", "warning", ",", "silence", "=", "True", ")", ":", "if", "not", "isinstance", "(", "warning", ",", "int", ")", ":", "raise", "ValueError", "(", "'Input to silence should be a warning object '", "'- not of type {}'", ".", "format", "(", "typ...
Silence a particular warning on all Bokeh models. Args: warning (Warning) : Bokeh warning to silence silence (bool) : Whether or not to silence the warning Returns: A set containing the all silenced warnings This function adds or removes warnings from a set of silencers which ...
[ "Silence", "a", "particular", "warning", "on", "all", "Bokeh", "models", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/validation/check.py#L43-L79
train
silence a particular warning on all Bokeh models.
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/validation/check.py
check_integrity
def check_integrity(models): ''' Apply validation and integrity checks to a collection of Bokeh models. Args: models (seq[Model]) : a collection of Models to test Returns: None This function will emit log warning and error messages for all error or warning conditions that are dete...
python
def check_integrity(models): ''' Apply validation and integrity checks to a collection of Bokeh models. Args: models (seq[Model]) : a collection of Models to test Returns: None This function will emit log warning and error messages for all error or warning conditions that are dete...
[ "def", "check_integrity", "(", "models", ")", ":", "messages", "=", "dict", "(", "error", "=", "[", "]", ",", "warning", "=", "[", "]", ")", "for", "model", "in", "models", ":", "validators", "=", "[", "]", "for", "name", "in", "dir", "(", "model",...
Apply validation and integrity checks to a collection of Bokeh models. Args: models (seq[Model]) : a collection of Models to test Returns: None This function will emit log warning and error messages for all error or warning conditions that are detected. For example, layouts without an...
[ "Apply", "validation", "and", "integrity", "checks", "to", "a", "collection", "of", "Bokeh", "models", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/validation/check.py#L82-L121
train
Apply validation and integrity checks to a collection of Bokeh models.
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/themes/theme.py
Theme.apply_to_model
def apply_to_model(self, model): ''' Apply this theme to a model. .. warning:: Typically, don't call this method directly. Instead, set the theme on the :class:`~bokeh.document.Document` the model is a part of. ''' model.apply_theme(self._for_class(model.__class...
python
def apply_to_model(self, model): ''' Apply this theme to a model. .. warning:: Typically, don't call this method directly. Instead, set the theme on the :class:`~bokeh.document.Document` the model is a part of. ''' model.apply_theme(self._for_class(model.__class...
[ "def", "apply_to_model", "(", "self", ",", "model", ")", ":", "model", ".", "apply_theme", "(", "self", ".", "_for_class", "(", "model", ".", "__class__", ")", ")", "# a little paranoia because it would be Bad(tm) to mess", "# this up... would be nicer if python had a way...
Apply this theme to a model. .. warning:: Typically, don't call this method directly. Instead, set the theme on the :class:`~bokeh.document.Document` the model is a part of.
[ "Apply", "this", "theme", "to", "a", "model", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/themes/theme.py#L186-L200
train
Apply this theme to a model.
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/util.py
OutputDocumentFor
def OutputDocumentFor(objs, apply_theme=None, always_new=False): ''' Find or create a (possibly temporary) Document to use for serializing Bokeh content. Typical usage is similar to: .. code-block:: python with OutputDocumentFor(models): (docs_json, [render_item]) = standalone_do...
python
def OutputDocumentFor(objs, apply_theme=None, always_new=False): ''' Find or create a (possibly temporary) Document to use for serializing Bokeh content. Typical usage is similar to: .. code-block:: python with OutputDocumentFor(models): (docs_json, [render_item]) = standalone_do...
[ "def", "OutputDocumentFor", "(", "objs", ",", "apply_theme", "=", "None", ",", "always_new", "=", "False", ")", ":", "# Note: Comms handling relies on the fact that the new_doc returned", "# has models with the same IDs as they were started with", "if", "not", "isinstance", "("...
Find or create a (possibly temporary) Document to use for serializing Bokeh content. Typical usage is similar to: .. code-block:: python with OutputDocumentFor(models): (docs_json, [render_item]) = standalone_docs_json_and_render_items(models) Inside the context manager, the mod...
[ "Find", "or", "create", "a", "(", "possibly", "temporary", ")", "Document", "to", "use", "for", "serializing", "Bokeh", "content", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/embed/util.py#L67-L168
train
This function returns a new Document for the given list of models.
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/util.py
submodel_has_python_callbacks
def submodel_has_python_callbacks(models): ''' Traverses submodels to check for Python (event) callbacks ''' has_python_callback = False for model in collect_models(models): if len(model._callbacks) > 0 or len(model._event_callbacks) > 0: has_python_callback = True break...
python
def submodel_has_python_callbacks(models): ''' Traverses submodels to check for Python (event) callbacks ''' has_python_callback = False for model in collect_models(models): if len(model._callbacks) > 0 or len(model._event_callbacks) > 0: has_python_callback = True break...
[ "def", "submodel_has_python_callbacks", "(", "models", ")", ":", "has_python_callback", "=", "False", "for", "model", "in", "collect_models", "(", "models", ")", ":", "if", "len", "(", "model", ".", "_callbacks", ")", ">", "0", "or", "len", "(", "model", "...
Traverses submodels to check for Python (event) callbacks
[ "Traverses", "submodels", "to", "check", "for", "Python", "(", "event", ")", "callbacks" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/embed/util.py#L305-L315
train
Checks if a list of models contains Python callbacks.
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/graphs.py
from_networkx
def from_networkx(graph, layout_function, **kwargs): ''' Generate a ``GraphRenderer`` from a ``networkx.Graph`` object and networkx layout function. Any keyword arguments will be passed to the layout function. Only two dimensional layouts are supported. Args: ...
python
def from_networkx(graph, layout_function, **kwargs): ''' Generate a ``GraphRenderer`` from a ``networkx.Graph`` object and networkx layout function. Any keyword arguments will be passed to the layout function. Only two dimensional layouts are supported. Args: ...
[ "def", "from_networkx", "(", "graph", ",", "layout_function", ",", "*", "*", "kwargs", ")", ":", "# inline import to prevent circular imports", "from", ".", ".", "models", ".", "renderers", "import", "GraphRenderer", "from", ".", ".", "models", ".", "graphs", "i...
Generate a ``GraphRenderer`` from a ``networkx.Graph`` object and networkx layout function. Any keyword arguments will be passed to the layout function. Only two dimensional layouts are supported. Args: graph (networkx.Graph) : a networkx graph to render layout_...
[ "Generate", "a", "GraphRenderer", "from", "a", "networkx", ".", "Graph", "object", "and", "networkx", "layout", "function", ".", "Any", "keyword", "arguments", "will", "be", "passed", "to", "the", "layout", "function", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/graphs.py#L71-L169
train
Generate a GraphRenderer from a networkx. Graph object and a networkx layout function.
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/enums.py
enumeration
def enumeration(*values, **kwargs): ''' Create an |Enumeration| object from a sequence of values. Call ``enumeration`` with a sequence of (unique) strings to create an Enumeration object: .. code-block:: python #: Specify the horizontal alignment for rendering text TextAlign = enumera...
python
def enumeration(*values, **kwargs): ''' Create an |Enumeration| object from a sequence of values. Call ``enumeration`` with a sequence of (unique) strings to create an Enumeration object: .. code-block:: python #: Specify the horizontal alignment for rendering text TextAlign = enumera...
[ "def", "enumeration", "(", "*", "values", ",", "*", "*", "kwargs", ")", ":", "if", "not", "(", "values", "and", "all", "(", "isinstance", "(", "value", ",", "string_types", ")", "and", "value", "for", "value", "in", "values", ")", ")", ":", "raise", ...
Create an |Enumeration| object from a sequence of values. Call ``enumeration`` with a sequence of (unique) strings to create an Enumeration object: .. code-block:: python #: Specify the horizontal alignment for rendering text TextAlign = enumeration("left", "right", "center") Args: ...
[ "Create", "an", "|Enumeration|", "object", "from", "a", "sequence", "of", "values", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/enums.py#L176-L223
train
Create an enumeration object from a sequence of unique strings.
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/session_id.py
generate_session_id
def generate_session_id(secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): """Generate a random session ID. Typically, each browser tab connected to a Bokeh application has its own session ID. In production deployments of a Bokeh app, session IDs should be random and unguessable...
python
def generate_session_id(secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): """Generate a random session ID. Typically, each browser tab connected to a Bokeh application has its own session ID. In production deployments of a Bokeh app, session IDs should be random and unguessable...
[ "def", "generate_session_id", "(", "secret_key", "=", "settings", ".", "secret_key_bytes", "(", ")", ",", "signed", "=", "settings", ".", "sign_sessions", "(", ")", ")", ":", "secret_key", "=", "_ensure_bytes", "(", "secret_key", ")", "if", "signed", ":", "#...
Generate a random session ID. Typically, each browser tab connected to a Bokeh application has its own session ID. In production deployments of a Bokeh app, session IDs should be random and unguessable - otherwise users of the app could interfere with one another. If session IDs are signed with a...
[ "Generate", "a", "random", "session", "ID", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/session_id.py#L63-L91
train
Generate a random session ID for the Bokeh 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/util/session_id.py
check_session_id_signature
def check_session_id_signature(session_id, secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): """Check the signature of a session ID, returning True if it's valid. The server uses this function to check whether a session ID was generated with the correc...
python
def check_session_id_signature(session_id, secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): """Check the signature of a session ID, returning True if it's valid. The server uses this function to check whether a session ID was generated with the correc...
[ "def", "check_session_id_signature", "(", "session_id", ",", "secret_key", "=", "settings", ".", "secret_key_bytes", "(", ")", ",", "signed", "=", "settings", ".", "sign_sessions", "(", ")", ")", ":", "secret_key", "=", "_ensure_bytes", "(", "secret_key", ")", ...
Check the signature of a session ID, returning True if it's valid. The server uses this function to check whether a session ID was generated with the correct secret key. If signed sessions are disabled, this function always returns True. Args: session_id (str) : The session ID to check ...
[ "Check", "the", "signature", "of", "a", "session", "ID", "returning", "True", "if", "it", "s", "valid", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/session_id.py#L93-L121
train
Checks the signature of a session ID. Returns True if it s valid.
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/session_id.py
_get_random_string
def _get_random_string(length=44, allowed_chars='abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', secret_key=settings.secret_key_bytes()): """ Return a securely generated random string. With the a-z, A-Z, 0-9 character s...
python
def _get_random_string(length=44, allowed_chars='abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', secret_key=settings.secret_key_bytes()): """ Return a securely generated random string. With the a-z, A-Z, 0-9 character s...
[ "def", "_get_random_string", "(", "length", "=", "44", ",", "allowed_chars", "=", "'abcdefghijklmnopqrstuvwxyz'", "'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'", ",", "secret_key", "=", "settings", ".", "secret_key_bytes", "(", ")", ")", ":", "secret_key", "=", "_ensure_bytes...
Return a securely generated random string. With the a-z, A-Z, 0-9 character set: Length 12 is a 71-bit value. log_2((26+26+10)^12) =~ 71 Length 44 is a 261-bit value. log_2((26+26+10)^44) = 261
[ "Return", "a", "securely", "generated", "random", "string", ".", "With", "the", "a", "-", "z", "A", "-", "Z", "0", "-", "9", "character", "set", ":", "Length", "12", "is", "a", "71", "-", "bit", "value", ".", "log_2", "((", "26", "+", "26", "+", ...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/session_id.py#L192-L204
train
Return a securely generated random 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/embed/notebook.py
notebook_content
def notebook_content(model, notebook_comms_target=None, theme=FromCurdoc): ''' Return script and div that will display a Bokeh plot in a Jupyter Notebook. The data for the plot is stored directly in the returned HTML. Args: model (Model) : Bokeh object to render notebook_comms_target ...
python
def notebook_content(model, notebook_comms_target=None, theme=FromCurdoc): ''' Return script and div that will display a Bokeh plot in a Jupyter Notebook. The data for the plot is stored directly in the returned HTML. Args: model (Model) : Bokeh object to render notebook_comms_target ...
[ "def", "notebook_content", "(", "model", ",", "notebook_comms_target", "=", "None", ",", "theme", "=", "FromCurdoc", ")", ":", "if", "not", "isinstance", "(", "model", ",", "Model", ")", ":", "raise", "ValueError", "(", "\"notebook_content expects a single Model i...
Return script and div that will display a Bokeh plot in a Jupyter Notebook. The data for the plot is stored directly in the returned HTML. Args: model (Model) : Bokeh object to render notebook_comms_target (str, optional) : A target name for a Jupyter Comms object that can upd...
[ "Return", "script", "and", "div", "that", "will", "display", "a", "Bokeh", "plot", "in", "a", "Jupyter", "Notebook", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/embed/notebook.py#L51-L98
train
Return a script and div that will display a Bokeh plot in a Jupyter Notebook.
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/transforms.py
CustomJSTransform.from_py_func
def from_py_func(cls, func, v_func): ''' Create a ``CustomJSTransform`` instance from a pair of Python functions. The function is translated to JavaScript using PScript. The python functions must have no positional arguments. It's possible to pass Bokeh models (e.g. a ``ColumnDataSource...
python
def from_py_func(cls, func, v_func): ''' Create a ``CustomJSTransform`` instance from a pair of Python functions. The function is translated to JavaScript using PScript. The python functions must have no positional arguments. It's possible to pass Bokeh models (e.g. a ``ColumnDataSource...
[ "def", "from_py_func", "(", "cls", ",", "func", ",", "v_func", ")", ":", "from", "bokeh", ".", "util", ".", "deprecation", "import", "deprecated", "deprecated", "(", "\"'from_py_func' is deprecated and will be removed in an eventual 2.0 release. \"", "\"Use CustomJSTransfor...
Create a ``CustomJSTransform`` instance from a pair of Python functions. The function is translated to JavaScript using PScript. The python functions must have no positional arguments. It's possible to pass Bokeh models (e.g. a ``ColumnDataSource``) as keyword arguments to the functions...
[ "Create", "a", "CustomJSTransform", "instance", "from", "a", "pair", "of", "Python", "functions", ".", "The", "function", "is", "translated", "to", "JavaScript", "using", "PScript", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/transforms.py#L89-L167
train
Create a CustomJSTransform instance from a pair of Python functions.
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/transforms.py
CustomJSTransform.from_coffeescript
def from_coffeescript(cls, func, v_func, args={}): ''' Create a ``CustomJSTransform`` instance from a pair of CoffeeScript snippets. The function bodies are translated to JavaScript functions using node and therefore require return statements. The ``func`` snippet namespace will contain...
python
def from_coffeescript(cls, func, v_func, args={}): ''' Create a ``CustomJSTransform`` instance from a pair of CoffeeScript snippets. The function bodies are translated to JavaScript functions using node and therefore require return statements. The ``func`` snippet namespace will contain...
[ "def", "from_coffeescript", "(", "cls", ",", "func", ",", "v_func", ",", "args", "=", "{", "}", ")", ":", "compiled", "=", "nodejs_compile", "(", "func", ",", "lang", "=", "\"coffeescript\"", ",", "file", "=", "\"???\"", ")", "if", "\"error\"", "in", "...
Create a ``CustomJSTransform`` instance from a pair of CoffeeScript snippets. The function bodies are translated to JavaScript functions using node and therefore require return statements. The ``func`` snippet namespace will contain the variable ``x`` (the untransformed value) at render...
[ "Create", "a", "CustomJSTransform", "instance", "from", "a", "pair", "of", "CoffeeScript", "snippets", ".", "The", "function", "bodies", "are", "translated", "to", "JavaScript", "functions", "using", "node", "and", "therefore", "require", "return", "statements", "...
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/transforms.py#L170-L206
train
Create a CustomJSTransform instance from a pair of CoffeeScript functions and a function.
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/has_props.py
abstract
def abstract(cls): ''' A decorator to mark abstract base classes derived from |HasProps|. ''' if not issubclass(cls, HasProps): raise TypeError("%s is not a subclass of HasProps" % cls.__name__) # running python with -OO will discard docstrings -> __doc__ is None if cls.__doc__ is not None...
python
def abstract(cls): ''' A decorator to mark abstract base classes derived from |HasProps|. ''' if not issubclass(cls, HasProps): raise TypeError("%s is not a subclass of HasProps" % cls.__name__) # running python with -OO will discard docstrings -> __doc__ is None if cls.__doc__ is not None...
[ "def", "abstract", "(", "cls", ")", ":", "if", "not", "issubclass", "(", "cls", ",", "HasProps", ")", ":", "raise", "TypeError", "(", "\"%s is not a subclass of HasProps\"", "%", "cls", ".", "__name__", ")", "# running python with -OO will discard docstrings -> __doc_...
A decorator to mark abstract base classes derived from |HasProps|.
[ "A", "decorator", "to", "mark", "abstract", "base", "classes", "derived", "from", "|HasProps|", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L65-L76
train
A decorator to mark abstract base classes derived from |HasProps|.
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/has_props.py
accumulate_from_superclasses
def accumulate_from_superclasses(cls, propname): ''' Traverse the class hierarchy and accumulate the special sets of names ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__container_props__``, ...
python
def accumulate_from_superclasses(cls, propname): ''' Traverse the class hierarchy and accumulate the special sets of names ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__container_props__``, ...
[ "def", "accumulate_from_superclasses", "(", "cls", ",", "propname", ")", ":", "cachename", "=", "\"__cached_all\"", "+", "propname", "# we MUST use cls.__dict__ NOT hasattr(). hasattr() would also look at base", "# classes, and the cache must be separate for each class", "if", "cache...
Traverse the class hierarchy and accumulate the special sets of names ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__container_props__``, ``__properties__``, ``__properties_with_refs__``
[ "Traverse", "the", "class", "hierarchy", "and", "accumulate", "the", "special", "sets", "of", "names", "MetaHasProps", "stores", "on", "classes", ":" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L191-L212
train
Traverse the class hierarchy and accumulate the special sets of names MetaHasProps stores on classes.
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/has_props.py
accumulate_dict_from_superclasses
def accumulate_dict_from_superclasses(cls, propname): ''' Traverse the class hierarchy and accumulate the special dicts ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__dataspecs__``, ``__o...
python
def accumulate_dict_from_superclasses(cls, propname): ''' Traverse the class hierarchy and accumulate the special dicts ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__dataspecs__``, ``__o...
[ "def", "accumulate_dict_from_superclasses", "(", "cls", ",", "propname", ")", ":", "cachename", "=", "\"__cached_all\"", "+", "propname", "# we MUST use cls.__dict__ NOT hasattr(). hasattr() would also look at base", "# classes, and the cache must be separate for each class", "if", "...
Traverse the class hierarchy and accumulate the special dicts ``MetaHasProps`` stores on classes: Args: name (str) : name of the special attribute to collect. Typically meaningful values are: ``__dataspecs__``, ``__overridden_defaults__``
[ "Traverse", "the", "class", "hierarchy", "and", "accumulate", "the", "special", "dicts", "MetaHasProps", "stores", "on", "classes", ":" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L214-L237
train
Traverse the class hierarchy and accumulate the special dicts archive on classes.
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/has_props.py
HasProps.equals
def equals(self, other): ''' Structural equality of models. Args: other (HasProps) : the other instance to compare to Returns: True, if properties are structurally equal, otherwise False ''' # NOTE: don't try to use this to implement __eq__. Because th...
python
def equals(self, other): ''' Structural equality of models. Args: other (HasProps) : the other instance to compare to Returns: True, if properties are structurally equal, otherwise False ''' # NOTE: don't try to use this to implement __eq__. Because th...
[ "def", "equals", "(", "self", ",", "other", ")", ":", "# NOTE: don't try to use this to implement __eq__. Because then", "# you will be tempted to implement __hash__, which would interfere", "# with mutability of models. However, not implementing __hash__", "# will make bokeh unusable in Pytho...
Structural equality of models. Args: other (HasProps) : the other instance to compare to Returns: True, if properties are structurally equal, otherwise False
[ "Structural", "equality", "of", "models", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L295-L314
train
Returns True if the properties of this object are structurally equal False otherwise.
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/has_props.py
HasProps.set_from_json
def set_from_json(self, name, json, models=None, setter=None): ''' Set a property value on this object from JSON. Args: name: (str) : name of the attribute to set json: (JSON-value) : value to set to the attribute to models (dict or None, optional) : ...
python
def set_from_json(self, name, json, models=None, setter=None): ''' Set a property value on this object from JSON. Args: name: (str) : name of the attribute to set json: (JSON-value) : value to set to the attribute to models (dict or None, optional) : ...
[ "def", "set_from_json", "(", "self", ",", "name", ",", "json", ",", "models", "=", "None", ",", "setter", "=", "None", ")", ":", "if", "name", "in", "self", ".", "properties", "(", ")", ":", "log", ".", "trace", "(", "\"Patching attribute %r of %r with %...
Set a property value on this object from JSON. Args: name: (str) : name of the attribute to set json: (JSON-value) : value to set to the attribute to models (dict or None, optional) : Mapping of model ids to models (default: None) This is n...
[ "Set", "a", "property", "value", "on", "this", "object", "from", "JSON", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L316-L349
train
Set a property value on this object from a JSON - value.
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/has_props.py
HasProps.update_from_json
def update_from_json(self, json_attributes, models=None, setter=None): ''' Updates the object's properties from a JSON attributes dictionary. Args: json_attributes: (JSON-dict) : attributes and values to update models (dict or None, optional) : Mapping of model ...
python
def update_from_json(self, json_attributes, models=None, setter=None): ''' Updates the object's properties from a JSON attributes dictionary. Args: json_attributes: (JSON-dict) : attributes and values to update models (dict or None, optional) : Mapping of model ...
[ "def", "update_from_json", "(", "self", ",", "json_attributes", ",", "models", "=", "None", ",", "setter", "=", "None", ")", ":", "for", "k", ",", "v", "in", "json_attributes", ".", "items", "(", ")", ":", "self", ".", "set_from_json", "(", "k", ",", ...
Updates the object's properties from a JSON attributes dictionary. Args: json_attributes: (JSON-dict) : attributes and values to update models (dict or None, optional) : Mapping of model ids to models (default: None) This is needed in cases where the at...
[ "Updates", "the", "object", "s", "properties", "from", "a", "JSON", "attributes", "dictionary", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L378-L405
train
Updates the object s properties from a JSON - dict.
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/has_props.py
HasProps.properties
def properties(cls, with_bases=True): ''' Collect the names of properties on this class. This method *optionally* traverses the class hierarchy and includes properties defined on any parent classes. Args: with_bases (bool, optional) : Whether to include prop...
python
def properties(cls, with_bases=True): ''' Collect the names of properties on this class. This method *optionally* traverses the class hierarchy and includes properties defined on any parent classes. Args: with_bases (bool, optional) : Whether to include prop...
[ "def", "properties", "(", "cls", ",", "with_bases", "=", "True", ")", ":", "if", "with_bases", ":", "return", "accumulate_from_superclasses", "(", "cls", ",", "\"__properties__\"", ")", "else", ":", "return", "set", "(", "cls", ".", "__properties__", ")" ]
Collect the names of properties on this class. This method *optionally* traverses the class hierarchy and includes properties defined on any parent classes. Args: with_bases (bool, optional) : Whether to include properties defined on parent classes in ...
[ "Collect", "the", "names", "of", "properties", "on", "this", "class", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L449-L467
train
Collect the names of properties defined on this 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...
bokeh/bokeh
bokeh/core/has_props.py
HasProps.properties_with_values
def properties_with_values(self, include_defaults=True): ''' Collect a dict mapping property names to their values. This method *always* traverses the class hierarchy and includes properties defined on any parent classes. Non-serializable properties are skipped and property values are ...
python
def properties_with_values(self, include_defaults=True): ''' Collect a dict mapping property names to their values. This method *always* traverses the class hierarchy and includes properties defined on any parent classes. Non-serializable properties are skipped and property values are ...
[ "def", "properties_with_values", "(", "self", ",", "include_defaults", "=", "True", ")", ":", "return", "self", ".", "query_properties_with_values", "(", "lambda", "prop", ":", "prop", ".", "serialized", ",", "include_defaults", ")" ]
Collect a dict mapping property names to their values. This method *always* traverses the class hierarchy and includes properties defined on any parent classes. Non-serializable properties are skipped and property values are in "serialized" format which may be slightly different from t...
[ "Collect", "a", "dict", "mapping", "property", "names", "to", "their", "values", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L496-L517
train
Collect a dict mapping property names to their values.
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/has_props.py
HasProps.query_properties_with_values
def query_properties_with_values(self, query, include_defaults=True): ''' Query the properties values of |HasProps| instances with a predicate. Args: query (callable) : A callable that accepts property descriptors and returns True or False ...
python
def query_properties_with_values(self, query, include_defaults=True): ''' Query the properties values of |HasProps| instances with a predicate. Args: query (callable) : A callable that accepts property descriptors and returns True or False ...
[ "def", "query_properties_with_values", "(", "self", ",", "query", ",", "include_defaults", "=", "True", ")", ":", "themed_keys", "=", "set", "(", ")", "result", "=", "dict", "(", ")", "if", "include_defaults", ":", "keys", "=", "self", ".", "properties", "...
Query the properties values of |HasProps| instances with a predicate. Args: query (callable) : A callable that accepts property descriptors and returns True or False include_defaults (bool, optional) : Whether to include propertie...
[ "Query", "the", "properties", "values", "of", "|HasProps|", "instances", "with", "a", "predicate", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L528-L570
train
Query the properties values of |HasProps| instances with a predicate.
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/has_props.py
HasProps.apply_theme
def apply_theme(self, property_values): ''' Apply a set of theme values which will be used rather than defaults, but will not override application-set values. The passed-in dictionary may be kept around as-is and shared with other instances to save memory (so neither the caller nor the ...
python
def apply_theme(self, property_values): ''' Apply a set of theme values which will be used rather than defaults, but will not override application-set values. The passed-in dictionary may be kept around as-is and shared with other instances to save memory (so neither the caller nor the ...
[ "def", "apply_theme", "(", "self", ",", "property_values", ")", ":", "old_dict", "=", "self", ".", "themed_values", "(", ")", "# if the same theme is set again, it should reuse the same dict", "if", "old_dict", "is", "property_values", ":", "return", "removed", "=", "...
Apply a set of theme values which will be used rather than defaults, but will not override application-set values. The passed-in dictionary may be kept around as-is and shared with other instances to save memory (so neither the caller nor the |HasProps| instance should modify it). ...
[ "Apply", "a", "set", "of", "theme", "values", "which", "will", "be", "used", "rather", "than", "defaults", "but", "will", "not", "override", "application", "-", "set", "values", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/core/has_props.py#L584-L629
train
Applies a set of theme values which will be used rather than the application - set values.
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/string.py
indent
def indent(text, n=2, ch=" "): ''' Indent all the lines in a given block of text by a specified amount. Args: text (str) : The text to indent n (int, optional) : The amount to indent each line by (default: 2) ch (char, optional) : What character to ...
python
def indent(text, n=2, ch=" "): ''' Indent all the lines in a given block of text by a specified amount. Args: text (str) : The text to indent n (int, optional) : The amount to indent each line by (default: 2) ch (char, optional) : What character to ...
[ "def", "indent", "(", "text", ",", "n", "=", "2", ",", "ch", "=", "\" \"", ")", ":", "padding", "=", "ch", "*", "n", "return", "\"\\n\"", ".", "join", "(", "padding", "+", "line", "for", "line", "in", "text", ".", "split", "(", "\"\\n\"", ")", ...
Indent all the lines in a given block of text by a specified amount. Args: text (str) : The text to indent n (int, optional) : The amount to indent each line by (default: 2) ch (char, optional) : What character to fill the indentation with (default: " "...
[ "Indent", "all", "the", "lines", "in", "a", "given", "block", "of", "text", "by", "a", "specified", "amount", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/string.py#L105-L120
train
Indent all the lines in a given block of text by a specified amount.
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/string.py
nice_join
def nice_join(seq, sep=", ", conjuction="or"): ''' Join together sequences of strings into English-friendly phrases using the conjunction ``or`` when appropriate. Args: seq (seq[str]) : a sequence of strings to nicely join sep (str, optional) : a sequence delimiter to use (default: ", ") ...
python
def nice_join(seq, sep=", ", conjuction="or"): ''' Join together sequences of strings into English-friendly phrases using the conjunction ``or`` when appropriate. Args: seq (seq[str]) : a sequence of strings to nicely join sep (str, optional) : a sequence delimiter to use (default: ", ") ...
[ "def", "nice_join", "(", "seq", ",", "sep", "=", "\", \"", ",", "conjuction", "=", "\"or\"", ")", ":", "seq", "=", "[", "str", "(", "x", ")", "for", "x", "in", "seq", "]", "if", "len", "(", "seq", ")", "<=", "1", "or", "conjuction", "is", "None...
Join together sequences of strings into English-friendly phrases using the conjunction ``or`` when appropriate. Args: seq (seq[str]) : a sequence of strings to nicely join sep (str, optional) : a sequence delimiter to use (default: ", ") conjunction (str or None, optional) : a conjuctio...
[ "Join", "together", "sequences", "of", "strings", "into", "English", "-", "friendly", "phrases", "using", "the", "conjunction", "or", "when", "appropriate", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/string.py#L122-L145
train
Join together sequences of strings into English - friendly phrases using the conjunction or when appropriate.
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/string.py
snakify
def snakify(name, sep='_'): ''' Convert CamelCase to snake_case. ''' name = re.sub("([A-Z]+)([A-Z][a-z])", r"\1%s\2" % sep, name) name = re.sub("([a-z\\d])([A-Z])", r"\1%s\2" % sep, name) return name.lower()
python
def snakify(name, sep='_'): ''' Convert CamelCase to snake_case. ''' name = re.sub("([A-Z]+)([A-Z][a-z])", r"\1%s\2" % sep, name) name = re.sub("([a-z\\d])([A-Z])", r"\1%s\2" % sep, name) return name.lower()
[ "def", "snakify", "(", "name", ",", "sep", "=", "'_'", ")", ":", "name", "=", "re", ".", "sub", "(", "\"([A-Z]+)([A-Z][a-z])\"", ",", "r\"\\1%s\\2\"", "%", "sep", ",", "name", ")", "name", "=", "re", ".", "sub", "(", "\"([a-z\\\\d])([A-Z])\"", ",", "r\...
Convert CamelCase to snake_case.
[ "Convert", "CamelCase", "to", "snake_case", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/string.py#L147-L151
train
Convert CamelCase to snake_case.
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/document_lifecycle.py
_on_session_destroyed
def _on_session_destroyed(session_context): ''' Calls any on_session_destroyed callbacks defined on the Document ''' callbacks = session_context._document.session_destroyed_callbacks session_context._document.session_destroyed_callbacks = set() for callback in callbacks: try: ...
python
def _on_session_destroyed(session_context): ''' Calls any on_session_destroyed callbacks defined on the Document ''' callbacks = session_context._document.session_destroyed_callbacks session_context._document.session_destroyed_callbacks = set() for callback in callbacks: try: ...
[ "def", "_on_session_destroyed", "(", "session_context", ")", ":", "callbacks", "=", "session_context", ".", "_document", ".", "session_destroyed_callbacks", "session_context", ".", "_document", ".", "session_destroyed_callbacks", "=", "set", "(", ")", "for", "callback",...
Calls any on_session_destroyed callbacks defined on the Document
[ "Calls", "any", "on_session_destroyed", "callbacks", "defined", "on", "the", "Document" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/application/handlers/document_lifecycle.py#L60-L79
train
Calls any on_session_destroyed callbacks defined on 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/protocol/messages/__init__.py
register
def register(cls): ''' Decorator to add a Message (and its revision) to the Protocol index. Example: .. code-block:: python @register class some_msg_1(Message): msgtype = 'SOME-MSG' revision = 1 @classmethod de...
python
def register(cls): ''' Decorator to add a Message (and its revision) to the Protocol index. Example: .. code-block:: python @register class some_msg_1(Message): msgtype = 'SOME-MSG' revision = 1 @classmethod de...
[ "def", "register", "(", "cls", ")", ":", "key", "=", "(", "cls", ".", "msgtype", ",", "cls", ".", "revision", ")", "if", "key", "in", "index", ":", "raise", "ProtocolError", "(", "\"Duplicate message specification encountered: %r\"", "%", "key", ")", "index"...
Decorator to add a Message (and its revision) to the Protocol index. Example: .. code-block:: python @register class some_msg_1(Message): msgtype = 'SOME-MSG' revision = 1 @classmethod def create(cls, **metadata): ...
[ "Decorator", "to", "add", "a", "Message", "(", "and", "its", "revision", ")", "to", "the", "Protocol", "index", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/messages/__init__.py#L49-L73
train
Decorator to register a Message class in the Protocol index.
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/session.py
pull_session
def pull_session(session_id=None, url='default', io_loop=None, arguments=None): ''' Create a session by loading the current server-side document. ``session.document`` will be a fresh document loaded from the server. While the connection to the server is open, changes made on the server side will be app...
python
def pull_session(session_id=None, url='default', io_loop=None, arguments=None): ''' Create a session by loading the current server-side document. ``session.document`` will be a fresh document loaded from the server. While the connection to the server is open, changes made on the server side will be app...
[ "def", "pull_session", "(", "session_id", "=", "None", ",", "url", "=", "'default'", ",", "io_loop", "=", "None", ",", "arguments", "=", "None", ")", ":", "coords", "=", "_SessionCoordinates", "(", "session_id", "=", "session_id", ",", "url", "=", "url", ...
Create a session by loading the current server-side document. ``session.document`` will be a fresh document loaded from the server. While the connection to the server is open, changes made on the server side will be applied to this document, and changes made on the client side will be synced to the...
[ "Create", "a", "session", "by", "loading", "the", "current", "server", "-", "side", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L68-L125
train
Create a new session from the server - side 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/client/session.py
push_session
def push_session(document, session_id=None, url='default', io_loop=None): ''' Create a session by pushing the given document to the server, overwriting any existing server-side document. ``session.document`` in the returned session will be your supplied document. While the connection to the server is o...
python
def push_session(document, session_id=None, url='default', io_loop=None): ''' Create a session by pushing the given document to the server, overwriting any existing server-side document. ``session.document`` in the returned session will be your supplied document. While the connection to the server is o...
[ "def", "push_session", "(", "document", ",", "session_id", "=", "None", ",", "url", "=", "'default'", ",", "io_loop", "=", "None", ")", ":", "coords", "=", "_SessionCoordinates", "(", "session_id", "=", "session_id", ",", "url", "=", "url", ")", "session",...
Create a session by pushing the given document to the server, overwriting any existing server-side document. ``session.document`` in the returned session will be your supplied document. While the connection to the server is open, changes made on the server side will be applied to this document, and cha...
[ "Create", "a", "session", "by", "pushing", "the", "given", "document", "to", "the", "server", "overwriting", "any", "existing", "server", "-", "side", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L127-L169
train
Creates a new ClientSession connected to the server with the given 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/client/session.py
show_session
def show_session(session_id=None, url='default', session=None, browser=None, new="tab", controller=None): ''' Open a browser displaying a session document. If you have a session from ``pull_session()`` or ``push_session`` you can ``show_session(session=mysession)``. If you don't need to open a ...
python
def show_session(session_id=None, url='default', session=None, browser=None, new="tab", controller=None): ''' Open a browser displaying a session document. If you have a session from ``pull_session()`` or ``push_session`` you can ``show_session(session=mysession)``. If you don't need to open a ...
[ "def", "show_session", "(", "session_id", "=", "None", ",", "url", "=", "'default'", ",", "session", "=", "None", ",", "browser", "=", "None", ",", "new", "=", "\"tab\"", ",", "controller", "=", "None", ")", ":", "if", "session", "is", "not", "None", ...
Open a browser displaying a session document. If you have a session from ``pull_session()`` or ``push_session`` you can ``show_session(session=mysession)``. If you don't need to open a connection to the server yourself, you can show a new session in a browser by providing just the ``url...
[ "Open", "a", "browser", "displaying", "a", "session", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L171-L214
train
Open a browser showing a session 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/client/session.py
ClientSession.loop_until_closed
def loop_until_closed(self, suppress_warning=False): ''' Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHL...
python
def loop_until_closed(self, suppress_warning=False): ''' Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHL...
[ "def", "loop_until_closed", "(", "self", ",", "suppress_warning", "=", "False", ")", ":", "suppress_warning", "# shut up flake", "from", "bokeh", ".", "util", ".", "deprecation", "import", "deprecated", "deprecated", "(", "\"ClientSession.loop_until_closed is deprecated, ...
Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, this practice is HIGHLY DISCOURAGED for any real use case. This function is int...
[ "Execute", "a", "blocking", "loop", "that", "runs", "and", "executes", "event", "callbacks", "until", "the", "connection", "is", "closed", "(", "e", ".", "g", ".", "by", "hitting", "Ctrl", "-", "C", ")", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L337-L354
train
Execute a blocking loop that runs and executes event callbacks until the connection is closed.
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/session.py
ClientSession.pull
def pull(self): ''' Pull the server's state and set it as session.document. If this is called more than once, session.document will be the same object instance but its contents will be overwritten. Automatically calls :func:`connect` before pulling. ''' self.connect() ...
python
def pull(self): ''' Pull the server's state and set it as session.document. If this is called more than once, session.document will be the same object instance but its contents will be overwritten. Automatically calls :func:`connect` before pulling. ''' self.connect() ...
[ "def", "pull", "(", "self", ")", ":", "self", ".", "connect", "(", ")", "if", "not", "self", ".", "connected", ":", "raise", "IOError", "(", "\"Cannot pull session document because we failed to connect to the server (to start the server, try the 'bokeh serve' command)\"", "...
Pull the server's state and set it as session.document. If this is called more than once, session.document will be the same object instance but its contents will be overwritten. Automatically calls :func:`connect` before pulling.
[ "Pull", "the", "server", "s", "state", "and", "set", "it", "as", "session", ".", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L356-L375
train
Pull the server s state and set it as session. 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/client/session.py
ClientSession.push
def push(self, document=None): ''' Push the given document to the server and record it as session.document. If this is called more than once, the Document has to be the same (or None to mean "session.document"). .. note:: Automatically calls :func:`~connect` before pushing....
python
def push(self, document=None): ''' Push the given document to the server and record it as session.document. If this is called more than once, the Document has to be the same (or None to mean "session.document"). .. note:: Automatically calls :func:`~connect` before pushing....
[ "def", "push", "(", "self", ",", "document", "=", "None", ")", ":", "if", "self", ".", "document", "is", "None", ":", "if", "document", "is", "None", ":", "doc", "=", "Document", "(", ")", "else", ":", "doc", "=", "document", "else", ":", "if", "...
Push the given document to the server and record it as session.document. If this is called more than once, the Document has to be the same (or None to mean "session.document"). .. note:: Automatically calls :func:`~connect` before pushing. Args: document (:clas...
[ "Push", "the", "given", "document", "to", "the", "server", "and", "record", "it", "as", "session", ".", "document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L377-L408
train
Push the given document to the server and record it as session. 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/client/session.py
ClientSession.show
def show(self, obj=None, browser=None, new="tab"): ''' Open a browser displaying this session. Args: obj (LayoutDOM object, optional) : a Layout (Row/Column), Plot or Widget object to display. The object will be added to the session's document. b...
python
def show(self, obj=None, browser=None, new="tab"): ''' Open a browser displaying this session. Args: obj (LayoutDOM object, optional) : a Layout (Row/Column), Plot or Widget object to display. The object will be added to the session's document. b...
[ "def", "show", "(", "self", ",", "obj", "=", "None", ",", "browser", "=", "None", ",", "new", "=", "\"tab\"", ")", ":", "if", "obj", "and", "obj", "not", "in", "self", ".", "document", ".", "roots", ":", "self", ".", "document", ".", "add_root", ...
Open a browser displaying this session. Args: obj (LayoutDOM object, optional) : a Layout (Row/Column), Plot or Widget object to display. The object will be added to the session's document. browser (str, optional) : browser to show with (default: None) ...
[ "Open", "a", "browser", "displaying", "this", "session", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L419-L441
train
Open a browser displaying this session.
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/session.py
ClientSession._notify_disconnected
def _notify_disconnected(self): ''' Called by the ClientConnection we are using to notify us of disconnect. ''' if self.document is not None: self.document.remove_on_change(self) self._callbacks.remove_all_callbacks()
python
def _notify_disconnected(self): ''' Called by the ClientConnection we are using to notify us of disconnect. ''' if self.document is not None: self.document.remove_on_change(self) self._callbacks.remove_all_callbacks()
[ "def", "_notify_disconnected", "(", "self", ")", ":", "if", "self", ".", "document", "is", "not", "None", ":", "self", ".", "document", ".", "remove_on_change", "(", "self", ")", "self", ".", "_callbacks", ".", "remove_all_callbacks", "(", ")" ]
Called by the ClientConnection we are using to notify us of disconnect.
[ "Called", "by", "the", "ClientConnection", "we", "are", "using", "to", "notify", "us", "of", "disconnect", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/client/session.py#L471-L477
train
Called by the client when the connection is disconnected.
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/protocol/message.py
Message.assemble
def assemble(cls, header_json, metadata_json, content_json): ''' Creates a new message, assembled from JSON fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: Message subclass Raises...
python
def assemble(cls, header_json, metadata_json, content_json): ''' Creates a new message, assembled from JSON fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: Message subclass Raises...
[ "def", "assemble", "(", "cls", ",", "header_json", ",", "metadata_json", ",", "content_json", ")", ":", "try", ":", "header", "=", "json_decode", "(", "header_json", ")", "except", "ValueError", ":", "raise", "MessageError", "(", "\"header could not be decoded\"",...
Creates a new message, assembled from JSON fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: Message subclass Raises: MessageError
[ "Creates", "a", "new", "message", "assembled", "from", "JSON", "fragments", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L119-L158
train
Assemble a new message from JSON fragments.
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/protocol/message.py
Message.add_buffer
def add_buffer(self, buf_header, buf_payload): ''' Associate a buffer header and payload with this message. Args: buf_header (``JSON``) : a buffer header buf_payload (``JSON`` or bytes) : a buffer payload Returns: None Raises: MessageErr...
python
def add_buffer(self, buf_header, buf_payload): ''' Associate a buffer header and payload with this message. Args: buf_header (``JSON``) : a buffer header buf_payload (``JSON`` or bytes) : a buffer payload Returns: None Raises: MessageErr...
[ "def", "add_buffer", "(", "self", ",", "buf_header", ",", "buf_payload", ")", ":", "if", "'num_buffers'", "in", "self", ".", "_header", ":", "self", ".", "_header", "[", "'num_buffers'", "]", "+=", "1", "else", ":", "self", ".", "_header", "[", "'num_buf...
Associate a buffer header and payload with this message. Args: buf_header (``JSON``) : a buffer header buf_payload (``JSON`` or bytes) : a buffer payload Returns: None Raises: MessageError
[ "Associate", "a", "buffer", "header", "and", "payload", "with", "this", "message", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L160-L181
train
Associate a buffer header and payload with this 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...
bokeh/bokeh
bokeh/protocol/message.py
Message.assemble_buffer
def assemble_buffer(self, buf_header, buf_payload): ''' Add a buffer header and payload that we read from the socket. This differs from add_buffer() because we're validating vs. the header's num_buffers, instead of filling in the header. Args: buf_header (``JSON``) : a buff...
python
def assemble_buffer(self, buf_header, buf_payload): ''' Add a buffer header and payload that we read from the socket. This differs from add_buffer() because we're validating vs. the header's num_buffers, instead of filling in the header. Args: buf_header (``JSON``) : a buff...
[ "def", "assemble_buffer", "(", "self", ",", "buf_header", ",", "buf_payload", ")", ":", "if", "self", ".", "header", ".", "get", "(", "'num_buffers'", ",", "0", ")", "<=", "len", "(", "self", ".", "_buffers", ")", ":", "raise", "ProtocolError", "(", "\...
Add a buffer header and payload that we read from the socket. This differs from add_buffer() because we're validating vs. the header's num_buffers, instead of filling in the header. Args: buf_header (``JSON``) : a buffer header buf_payload (``JSON`` or bytes) : a buffer...
[ "Add", "a", "buffer", "header", "and", "payload", "that", "we", "read", "from", "the", "socket", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L183-L201
train
Assemble a buffer header and payload.
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/protocol/message.py
Message.write_buffers
def write_buffers(self, conn, locked=True): ''' Write any buffer headers and payloads to the given connection. Args: conn (object) : May be any object with a ``write_message`` method. Typically, a Tornado ``WSHandler`` or ``WebSocketClientConnection`` ...
python
def write_buffers(self, conn, locked=True): ''' Write any buffer headers and payloads to the given connection. Args: conn (object) : May be any object with a ``write_message`` method. Typically, a Tornado ``WSHandler`` or ``WebSocketClientConnection`` ...
[ "def", "write_buffers", "(", "self", ",", "conn", ",", "locked", "=", "True", ")", ":", "if", "conn", "is", "None", ":", "raise", "ValueError", "(", "\"Cannot write_buffers to connection None\"", ")", "sent", "=", "0", "for", "header", ",", "payload", "in", ...
Write any buffer headers and payloads to the given connection. Args: conn (object) : May be any object with a ``write_message`` method. Typically, a Tornado ``WSHandler`` or ``WebSocketClientConnection`` locked (bool) : Returns: int ...
[ "Write", "any", "buffer", "headers", "and", "payloads", "to", "the", "given", "connection", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L204-L225
train
Write any buffered messages to the given 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...
bokeh/bokeh
bokeh/protocol/message.py
Message.create_header
def create_header(cls, request_id=None): ''' Return a message header fragment dict. Args: request_id (str or None) : Message ID of the message this message replies to Returns: dict : a message header ''' header = { 'msgid' ...
python
def create_header(cls, request_id=None): ''' Return a message header fragment dict. Args: request_id (str or None) : Message ID of the message this message replies to Returns: dict : a message header ''' header = { 'msgid' ...
[ "def", "create_header", "(", "cls", ",", "request_id", "=", "None", ")", ":", "header", "=", "{", "'msgid'", ":", "bkserial", ".", "make_id", "(", ")", ",", "'msgtype'", ":", "cls", ".", "msgtype", "}", "if", "request_id", "is", "not", "None", ":", "...
Return a message header fragment dict. Args: request_id (str or None) : Message ID of the message this message replies to Returns: dict : a message header
[ "Return", "a", "message", "header", "fragment", "dict", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L228-L245
train
Create a message header fragment dict.
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/protocol/message.py
Message.send
def send(self, conn): ''' Send the message on the given connection. Args: conn (WebSocketHandler) : a WebSocketHandler to send messages Returns: int : number of bytes sent ''' if conn is None: raise ValueError("Cannot send to connection None...
python
def send(self, conn): ''' Send the message on the given connection. Args: conn (WebSocketHandler) : a WebSocketHandler to send messages Returns: int : number of bytes sent ''' if conn is None: raise ValueError("Cannot send to connection None...
[ "def", "send", "(", "self", ",", "conn", ")", ":", "if", "conn", "is", "None", ":", "raise", "ValueError", "(", "\"Cannot send to connection None\"", ")", "with", "(", "yield", "conn", ".", "write_lock", ".", "acquire", "(", ")", ")", ":", "sent", "=", ...
Send the message on the given connection. Args: conn (WebSocketHandler) : a WebSocketHandler to send messages Returns: int : number of bytes sent
[ "Send", "the", "message", "on", "the", "given", "connection", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L248-L281
train
Send the message on the given 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...
bokeh/bokeh
bokeh/protocol/message.py
Message.complete
def complete(self): ''' Returns whether all required parts of a message are present. Returns: bool : True if the message is complete, False otherwise ''' return self.header is not None and \ self.metadata is not None and \ self.content is not None an...
python
def complete(self): ''' Returns whether all required parts of a message are present. Returns: bool : True if the message is complete, False otherwise ''' return self.header is not None and \ self.metadata is not None and \ self.content is not None an...
[ "def", "complete", "(", "self", ")", ":", "return", "self", ".", "header", "is", "not", "None", "and", "self", ".", "metadata", "is", "not", "None", "and", "self", ".", "content", "is", "not", "None", "and", "self", ".", "header", ".", "get", "(", ...
Returns whether all required parts of a message are present. Returns: bool : True if the message is complete, False otherwise
[ "Returns", "whether", "all", "required", "parts", "of", "a", "message", "are", "present", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/message.py#L284-L294
train
Returns True if all required parts of a message are present.
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/logconfig.py
basicConfig
def basicConfig(*args, **kwargs): """ A logging.basicConfig() wrapper that also undoes the default Bokeh-specific configuration. """ if default_handler is not None: bokeh_logger.removeHandler(default_handler) bokeh_logger.propagate = True return logging.basicConfig(*args, **kwarg...
python
def basicConfig(*args, **kwargs): """ A logging.basicConfig() wrapper that also undoes the default Bokeh-specific configuration. """ if default_handler is not None: bokeh_logger.removeHandler(default_handler) bokeh_logger.propagate = True return logging.basicConfig(*args, **kwarg...
[ "def", "basicConfig", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "default_handler", "is", "not", "None", ":", "bokeh_logger", ".", "removeHandler", "(", "default_handler", ")", "bokeh_logger", ".", "propagate", "=", "True", "return", "logging...
A logging.basicConfig() wrapper that also undoes the default Bokeh-specific configuration.
[ "A", "logging", ".", "basicConfig", "()", "wrapper", "that", "also", "undoes", "the", "default", "Bokeh", "-", "specific", "configuration", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/logconfig.py#L57-L65
train
A basic config wrapper that undoes the default logging 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/util/deprecation.py
deprecated
def deprecated(since_or_msg, old=None, new=None, extra=None): """ Issue a nicely formatted deprecation warning. """ if isinstance(since_or_msg, tuple): if old is None or new is None: raise ValueError("deprecated entity and a replacement are required") if len(since_or_msg) != 3 or n...
python
def deprecated(since_or_msg, old=None, new=None, extra=None): """ Issue a nicely formatted deprecation warning. """ if isinstance(since_or_msg, tuple): if old is None or new is None: raise ValueError("deprecated entity and a replacement are required") if len(since_or_msg) != 3 or n...
[ "def", "deprecated", "(", "since_or_msg", ",", "old", "=", "None", ",", "new", "=", "None", ",", "extra", "=", "None", ")", ":", "if", "isinstance", "(", "since_or_msg", ",", "tuple", ")", ":", "if", "old", "is", "None", "or", "new", "is", "None", ...
Issue a nicely formatted deprecation warning.
[ "Issue", "a", "nicely", "formatted", "deprecation", "warning", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/deprecation.py#L45-L68
train
Issue a nicely formatted deprecation warning.
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/__main__.py
main
def main(): ''' Execute the "bokeh" command line program. ''' import sys from bokeh.command.bootstrap import main as _main # Main entry point (see setup.py) _main(sys.argv)
python
def main(): ''' Execute the "bokeh" command line program. ''' import sys from bokeh.command.bootstrap import main as _main # Main entry point (see setup.py) _main(sys.argv)
[ "def", "main", "(", ")", ":", "import", "sys", "from", "bokeh", ".", "command", ".", "bootstrap", "import", "main", "as", "_main", "# Main entry point (see setup.py)", "_main", "(", "sys", ".", "argv", ")" ]
Execute the "bokeh" command line program.
[ "Execute", "the", "bokeh", "command", "line", "program", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/__main__.py#L56-L64
train
Execute the bokeh command line program.
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/connection.py
ServerConnection.detach_session
def detach_session(self): """Allow the session to be discarded and don't get change notifications from it anymore""" if self._session is not None: self._session.unsubscribe(self) self._session = None
python
def detach_session(self): """Allow the session to be discarded and don't get change notifications from it anymore""" if self._session is not None: self._session.unsubscribe(self) self._session = None
[ "def", "detach_session", "(", "self", ")", ":", "if", "self", ".", "_session", "is", "not", "None", ":", "self", ".", "_session", ".", "unsubscribe", "(", "self", ")", "self", ".", "_session", "=", "None" ]
Allow the session to be discarded and don't get change notifications from it anymore
[ "Allow", "the", "session", "to", "be", "discarded", "and", "don", "t", "get", "change", "notifications", "from", "it", "anymore" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/connection.py#L62-L66
train
Detach the session from 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/server/connection.py
ServerConnection.send_patch_document
def send_patch_document(self, event): """ Sends a PATCH-DOC message, returning a Future that's completed when it's written out. """ msg = self.protocol.create('PATCH-DOC', [event]) return self._socket.send_message(msg)
python
def send_patch_document(self, event): """ Sends a PATCH-DOC message, returning a Future that's completed when it's written out. """ msg = self.protocol.create('PATCH-DOC', [event]) return self._socket.send_message(msg)
[ "def", "send_patch_document", "(", "self", ",", "event", ")", ":", "msg", "=", "self", ".", "protocol", ".", "create", "(", "'PATCH-DOC'", ",", "[", "event", "]", ")", "return", "self", ".", "_socket", ".", "send_message", "(", "msg", ")" ]
Sends a PATCH-DOC message, returning a Future that's completed when it's written out.
[ "Sends", "a", "PATCH", "-", "DOC", "message", "returning", "a", "Future", "that", "s", "completed", "when", "it", "s", "written", "out", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/server/connection.py#L74-L77
train
Sends a PATCH - DOC message to the server returning a Future that s completed when it s written out.
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/util.py
initialize_references_json
def initialize_references_json(references_json, references, setter=None): ''' Given a JSON representation of the models in a graph, and new model objects, set the properties on the models from the JSON Args: references_json (``JSON``) JSON specifying attributes and values to initialize ...
python
def initialize_references_json(references_json, references, setter=None): ''' Given a JSON representation of the models in a graph, and new model objects, set the properties on the models from the JSON Args: references_json (``JSON``) JSON specifying attributes and values to initialize ...
[ "def", "initialize_references_json", "(", "references_json", ",", "references", ",", "setter", "=", "None", ")", ":", "for", "obj", "in", "references_json", ":", "obj_id", "=", "obj", "[", "'id'", "]", "obj_attrs", "=", "obj", "[", "'attributes'", "]", "inst...
Given a JSON representation of the models in a graph, and new model objects, set the properties on the models from the JSON Args: references_json (``JSON``) JSON specifying attributes and values to initialize new model objects with. references (dict[str, Model]) ...
[ "Given", "a", "JSON", "representation", "of", "the", "models", "in", "a", "graph", "and", "new", "model", "objects", "set", "the", "properties", "on", "the", "models", "from", "the", "JSON" ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/util.py#L50-L90
train
Given a JSON representation of the models in a graph and a dictionary of model IDs and model objects initialize the properties on the models in the graph.
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/util.py
instantiate_references_json
def instantiate_references_json(references_json): ''' Given a JSON representation of all the models in a graph, return a dict of new model objects. Args: references_json (``JSON``) JSON specifying new Bokeh models to create Returns: dict[str, Model] ''' # Create a...
python
def instantiate_references_json(references_json): ''' Given a JSON representation of all the models in a graph, return a dict of new model objects. Args: references_json (``JSON``) JSON specifying new Bokeh models to create Returns: dict[str, Model] ''' # Create a...
[ "def", "instantiate_references_json", "(", "references_json", ")", ":", "# Create all instances, but without setting their props", "references", "=", "{", "}", "for", "obj", "in", "references_json", ":", "obj_id", "=", "obj", "[", "'id'", "]", "obj_type", "=", "obj", ...
Given a JSON representation of all the models in a graph, return a dict of new model objects. Args: references_json (``JSON``) JSON specifying new Bokeh models to create Returns: dict[str, Model]
[ "Given", "a", "JSON", "representation", "of", "all", "the", "models", "in", "a", "graph", "return", "a", "dict", "of", "new", "model", "objects", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/util.py#L92-L117
train
Given a JSON representation of all the models in a graph return a dictionary of new model 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/document/util.py
references_json
def references_json(references): ''' Given a list of all models in a graph, return JSON representing them and their properties. Args: references (seq[Model]) : A list of models to convert to JSON Returns: list ''' references_json = [] for r in references: ...
python
def references_json(references): ''' Given a list of all models in a graph, return JSON representing them and their properties. Args: references (seq[Model]) : A list of models to convert to JSON Returns: list ''' references_json = [] for r in references: ...
[ "def", "references_json", "(", "references", ")", ":", "references_json", "=", "[", "]", "for", "r", "in", "references", ":", "ref", "=", "r", ".", "ref", "ref", "[", "'attributes'", "]", "=", "r", ".", "_to_json_like", "(", "include_defaults", "=", "Fal...
Given a list of all models in a graph, return JSON representing them and their properties. Args: references (seq[Model]) : A list of models to convert to JSON Returns: list
[ "Given", "a", "list", "of", "all", "models", "in", "a", "graph", "return", "JSON", "representing", "them", "and", "their", "properties", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/util.py#L119-L138
train
Given a list of all models in a graph return JSON representing them and their properties.
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/events.py
Event.decode_json
def decode_json(cls, dct): ''' Custom JSON decoder for Events. Can be used as the ``object_hook`` argument of ``json.load`` or ``json.loads``. Args: dct (dict) : a JSON dictionary to decode The dictionary should have keys ``event_name`` and ``event_values`` ...
python
def decode_json(cls, dct): ''' Custom JSON decoder for Events. Can be used as the ``object_hook`` argument of ``json.load`` or ``json.loads``. Args: dct (dict) : a JSON dictionary to decode The dictionary should have keys ``event_name`` and ``event_values`` ...
[ "def", "decode_json", "(", "cls", ",", "dct", ")", ":", "if", "not", "(", "'event_name'", "in", "dct", "and", "'event_values'", "in", "dct", ")", ":", "return", "dct", "event_name", "=", "dct", "[", "'event_name'", "]", "if", "event_name", "not", "in", ...
Custom JSON decoder for Events. Can be used as the ``object_hook`` argument of ``json.load`` or ``json.loads``. Args: dct (dict) : a JSON dictionary to decode The dictionary should have keys ``event_name`` and ``event_values`` Raises: ValueError...
[ "Custom", "JSON", "decoder", "for", "Events", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/events.py#L150-L186
train
Custom JSON decoder for 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/sphinxext/bokeh_palette.py
bokeh_palette
def bokeh_palette(name, rawtext, text, lineno, inliner, options=None, content=None): ''' Generate an inline visual representations of a single color palette. This function evaluates the expression ``"palette = %s" % text``, in the context of a ``globals`` namespace that has previously imported all of `...
python
def bokeh_palette(name, rawtext, text, lineno, inliner, options=None, content=None): ''' Generate an inline visual representations of a single color palette. This function evaluates the expression ``"palette = %s" % text``, in the context of a ``globals`` namespace that has previously imported all of `...
[ "def", "bokeh_palette", "(", "name", ",", "rawtext", ",", "text", ",", "lineno", ",", "inliner", ",", "options", "=", "None", ",", "content", "=", "None", ")", ":", "try", ":", "exec", "(", "\"palette = %s\"", "%", "text", ",", "_globals", ")", "except...
Generate an inline visual representations of a single color palette. This function evaluates the expression ``"palette = %s" % text``, in the context of a ``globals`` namespace that has previously imported all of ``bokeh.plotting``. The resulting value for ``palette`` is used to construct a sequence of...
[ "Generate", "an", "inline", "visual", "representations", "of", "a", "single", "color", "palette", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/sphinxext/bokeh_palette.py#L89-L115
train
Generate an inline visual representation of a single color palette.
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/transform.py
cumsum
def cumsum(field, include_zero=False): ''' Create a Create a ``DataSpec`` dict to generate a ``CumSum`` expression for a ``ColumnDataSource``. Examples: .. code-block:: python p.wedge(start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'), ...
python
def cumsum(field, include_zero=False): ''' Create a Create a ``DataSpec`` dict to generate a ``CumSum`` expression for a ``ColumnDataSource``. Examples: .. code-block:: python p.wedge(start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'), ...
[ "def", "cumsum", "(", "field", ",", "include_zero", "=", "False", ")", ":", "return", "expr", "(", "CumSum", "(", "field", "=", "field", ",", "include_zero", "=", "include_zero", ")", ")" ]
Create a Create a ``DataSpec`` dict to generate a ``CumSum`` expression for a ``ColumnDataSource``. Examples: .. code-block:: python p.wedge(start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'), ...) will generate a ``C...
[ "Create", "a", "Create", "a", "DataSpec", "dict", "to", "generate", "a", "CumSum", "expression", "for", "a", "ColumnDataSource", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L55-L74
train
Create a DataSpec dict to generate a CumSum expression for a ColumnDataSource.
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/transform.py
dodge
def dodge(field_name, value, range=None): ''' Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with value (float) : the fixed offset to add to column data ...
python
def dodge(field_name, value, range=None): ''' Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with value (float) : the fixed offset to add to column data ...
[ "def", "dodge", "(", "field_name", ",", "value", ",", "range", "=", "None", ")", ":", "return", "field", "(", "field_name", ",", "Dodge", "(", "value", "=", "value", ",", "range", "=", "range", ")", ")" ]
Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with value (float) : the fixed offset to add to column data range (Range, optional) : a range to use for co...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "Jitter", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L76-L93
train
Creates a DataSpec dict that applies a client - side Jitter transformation to a column.
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/transform.py
factor_cmap
def factor_cmap(field_name, palette, factors, start=0, end=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
python
def factor_cmap(field_name, palette, factors, start=0, end=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
[ "def", "factor_cmap", "(", "field_name", ",", "palette", ",", "factors", ",", "start", "=", "0", ",", "end", "=", "None", ",", "nan_color", "=", "\"gray\"", ")", ":", "return", "field", "(", "field_name", ",", "CategoricalColorMapper", "(", "palette", "=",...
Create a ``DataSpec`` dict that applies a client-side ``CategoricalColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with palette (seq[color]) : a list of colors to use for colormapping factors (seq) : a ...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "CategoricalColorMapper", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L95-L125
train
Creates a DataSpec dict that applies a client - side CategoricalColorMapper transformation to a columnDataSource.
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/transform.py
factor_hatch
def factor_hatch(field_name, patterns, factors, start=0, end=None): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalPatternMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with patterns (seq...
python
def factor_hatch(field_name, patterns, factors, start=0, end=None): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalPatternMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with patterns (seq...
[ "def", "factor_hatch", "(", "field_name", ",", "patterns", ",", "factors", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "field", "(", "field_name", ",", "CategoricalPatternMapper", "(", "patterns", "=", "patterns", ",", "factors", "...
Create a ``DataSpec`` dict that applies a client-side ``CategoricalPatternMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with patterns (seq[string]) : a list of hatch patterns to use to map to factors (seq)...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "CategoricalPatternMapper", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L127-L155
train
Creates a DataSpec dict that applies a client - side CategoricalPatternMapper transformation to a column - source column.
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/transform.py
factor_mark
def factor_mark(field_name, markers, factors, start=0, end=None): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalMarkerMapper`` transformation to a ``ColumnDataSource`` column. .. note:: This transform is primarily only useful with ``scatter``, which can be param...
python
def factor_mark(field_name, markers, factors, start=0, end=None): ''' Create a ``DataSpec`` dict that applies a client-side ``CategoricalMarkerMapper`` transformation to a ``ColumnDataSource`` column. .. note:: This transform is primarily only useful with ``scatter``, which can be param...
[ "def", "factor_mark", "(", "field_name", ",", "markers", ",", "factors", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "field", "(", "field_name", ",", "CategoricalMarkerMapper", "(", "markers", "=", "markers", ",", "factors", "=", ...
Create a ``DataSpec`` dict that applies a client-side ``CategoricalMarkerMapper`` transformation to a ``ColumnDataSource`` column. .. note:: This transform is primarily only useful with ``scatter``, which can be parameterized by glyph type. Args: field_name (str) : a field name...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "CategoricalMarkerMapper", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L157-L187
train
Creates a DataSpec dict that applies a client - side CategoricalMarkerMapper transformation to a columnDataSource column.
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/transform.py
jitter
def jitter(field_name, width, mean=0, distribution="uniform", range=None): ''' Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with width (float) : the width of...
python
def jitter(field_name, width, mean=0, distribution="uniform", range=None): ''' Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with width (float) : the width of...
[ "def", "jitter", "(", "field_name", ",", "width", ",", "mean", "=", "0", ",", "distribution", "=", "\"uniform\"", ",", "range", "=", "None", ")", ":", "return", "field", "(", "field_name", ",", "Jitter", "(", "mean", "=", "mean", ",", "width", "=", "...
Create a ``DataSpec`` dict that applies a client-side ``Jitter`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with width (float) : the width of the random distribution to apply mean (float, optional) : an offset to ap...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "Jitter", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L189-L214
train
Creates a DataSpec dict that applies a client - side jitter transformation to a synthetic node.
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/transform.py
linear_cmap
def linear_cmap(field_name, palette, low, high, low_color=None, high_color=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applyies a client-side ``LinearColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
python
def linear_cmap(field_name, palette, low, high, low_color=None, high_color=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applyies a client-side ``LinearColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
[ "def", "linear_cmap", "(", "field_name", ",", "palette", ",", "low", ",", "high", ",", "low_color", "=", "None", ",", "high_color", "=", "None", ",", "nan_color", "=", "\"gray\"", ")", ":", "return", "field", "(", "field_name", ",", "LinearColorMapper", "(...
Create a ``DataSpec`` dict that applyies a client-side ``LinearColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with palette (seq[color]) : a list of colors to use for colormapping low (float) : a minimum va...
[ "Create", "a", "DataSpec", "dict", "that", "applyies", "a", "client", "-", "side", "LinearColorMapper", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L216-L248
train
Creates a DataSpec dict that applies a LinearColorMapper transformation to a ColumnDataSource column.
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/transform.py
log_cmap
def log_cmap(field_name, palette, low, high, low_color=None, high_color=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applies a client-side ``LogColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
python
def log_cmap(field_name, palette, low, high, low_color=None, high_color=None, nan_color="gray"): ''' Create a ``DataSpec`` dict that applies a client-side ``LogColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with ...
[ "def", "log_cmap", "(", "field_name", ",", "palette", ",", "low", ",", "high", ",", "low_color", "=", "None", ",", "high_color", "=", "None", ",", "nan_color", "=", "\"gray\"", ")", ":", "return", "field", "(", "field_name", ",", "LogColorMapper", "(", "...
Create a ``DataSpec`` dict that applies a client-side ``LogColorMapper`` transformation to a ``ColumnDataSource`` column. Args: field_name (str) : a field name to configure ``DataSpec`` with palette (seq[color]) : a list of colors to use for colormapping low (float) : a minimum value ...
[ "Create", "a", "DataSpec", "dict", "that", "applies", "a", "client", "-", "side", "LogColorMapper", "transformation", "to", "a", "ColumnDataSource", "column", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/transform.py#L250-L282
train
Creates a DataSpec dict that applies a client - side LogColorMapper transformation to a column.
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/browser.py
get_browser_controller
def get_browser_controller(browser=None): ''' Return a browser controller. Args: browser (str or None) : browser name, or ``None`` (default: ``None``) If passed the string ``'none'``, a dummy web browser controller is returned Otherwise, use the value to select an a...
python
def get_browser_controller(browser=None): ''' Return a browser controller. Args: browser (str or None) : browser name, or ``None`` (default: ``None``) If passed the string ``'none'``, a dummy web browser controller is returned Otherwise, use the value to select an a...
[ "def", "get_browser_controller", "(", "browser", "=", "None", ")", ":", "browser", "=", "settings", ".", "browser", "(", "browser", ")", "if", "browser", "is", "not", "None", ":", "if", "browser", "==", "'none'", ":", "controller", "=", "DummyWebBrowser", ...
Return a browser controller. Args: browser (str or None) : browser name, or ``None`` (default: ``None``) If passed the string ``'none'``, a dummy web browser controller is returned Otherwise, use the value to select an appropriate controller using the ``webb...
[ "Return", "a", "browser", "controller", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/browser.py#L56-L86
train
Return a web browser controller.
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/browser.py
view
def view(location, browser=None, new="same", autoraise=True): ''' Open a browser to view the specified location. Args: location (str) : Location to open If location does not begin with "http:" it is assumed to be a file path on the local filesystem. ...
python
def view(location, browser=None, new="same", autoraise=True): ''' Open a browser to view the specified location. Args: location (str) : Location to open If location does not begin with "http:" it is assumed to be a file path on the local filesystem. ...
[ "def", "view", "(", "location", ",", "browser", "=", "None", ",", "new", "=", "\"same\"", ",", "autoraise", "=", "True", ")", ":", "try", ":", "new", "=", "{", "\"same\"", ":", "0", ",", "\"window\"", ":", "1", ",", "\"tab\"", ":", "2", "}", "[",...
Open a browser to view the specified location. Args: location (str) : Location to open If location does not begin with "http:" it is assumed to be a file path on the local filesystem. browser (str or None) : what browser to use (default: None) ...
[ "Open", "a", "browser", "to", "view", "the", "specified", "location", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/util/browser.py#L88-L127
train
Open a browser to view the specified location.
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/filters.py
CustomJSFilter.from_py_func
def from_py_func(cls, func): ''' Create a ``CustomJSFilter`` instance from a Python function. The function is translated to JavaScript using PScript. The ``func`` function namespace will contain the variable ``source`` at render time. This will be the data source associated with the ``C...
python
def from_py_func(cls, func): ''' Create a ``CustomJSFilter`` instance from a Python function. The function is translated to JavaScript using PScript. The ``func`` function namespace will contain the variable ``source`` at render time. This will be the data source associated with the ``C...
[ "def", "from_py_func", "(", "cls", ",", "func", ")", ":", "from", "bokeh", ".", "util", ".", "deprecation", "import", "deprecated", "deprecated", "(", "\"'from_py_func' is deprecated and will be removed in an eventual 2.0 release. \"", "\"Use CustomJSFilter directly instead.\""...
Create a ``CustomJSFilter`` instance from a Python function. The function is translated to JavaScript using PScript. The ``func`` function namespace will contain the variable ``source`` at render time. This will be the data source associated with the ``CDSView`` that this filter is adde...
[ "Create", "a", "CustomJSFilter", "instance", "from", "a", "Python", "function", ".", "The", "function", "is", "translated", "to", "JavaScript", "using", "PScript", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/models/filters.py#L125-L162
train
Create a CustomJSFilter instance from a Python function.
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/plotting/file/vector.py
streamlines
def streamlines(x, y, u, v, density=1): ''' Return streamlines of a vector flow. * x and y are 1d arrays defining an *evenly spaced* grid. * u and v are 2d arrays (shape [y,x]) giving velocities. * density controls the closeness of the streamlines. For different densities in each direction, use a...
python
def streamlines(x, y, u, v, density=1): ''' Return streamlines of a vector flow. * x and y are 1d arrays defining an *evenly spaced* grid. * u and v are 2d arrays (shape [y,x]) giving velocities. * density controls the closeness of the streamlines. For different densities in each direction, use a...
[ "def", "streamlines", "(", "x", ",", "y", ",", "u", ",", "v", ",", "density", "=", "1", ")", ":", "## Set up some constants - size of the grid used.", "NGX", "=", "len", "(", "x", ")", "NGY", "=", "len", "(", "y", ")", "## Constants used to convert between g...
Return streamlines of a vector flow. * x and y are 1d arrays defining an *evenly spaced* grid. * u and v are 2d arrays (shape [y,x]) giving velocities. * density controls the closeness of the streamlines. For different densities in each direction, use a tuple or list [densityx, densityy].
[ "Return", "streamlines", "of", "a", "vector", "flow", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/plotting/file/vector.py#L8-L172
train
Return a streamline of a vector flow.
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/howto/events_app.py
display_event
def display_event(div, attributes=[]): """ Function to build a suitable CustomJS to display the current event in the div model. """ style = 'float: left; clear: left; font-size: 10pt' return CustomJS(args=dict(div=div), code=""" var attrs = %s; var args = []; for (var i =...
python
def display_event(div, attributes=[]): """ Function to build a suitable CustomJS to display the current event in the div model. """ style = 'float: left; clear: left; font-size: 10pt' return CustomJS(args=dict(div=div), code=""" var attrs = %s; var args = []; for (var i =...
[ "def", "display_event", "(", "div", ",", "attributes", "=", "[", "]", ")", ":", "style", "=", "'float: left; clear: left; font-size: 10pt'", "return", "CustomJS", "(", "args", "=", "dict", "(", "div", "=", "div", ")", ",", "code", "=", "\"\"\"\n var att...
Function to build a suitable CustomJS to display the current event in the div model.
[ "Function", "to", "build", "a", "suitable", "CustomJS", "to", "display", "the", "current", "event", "in", "the", "div", "model", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/howto/events_app.py#L16-L37
train
Function to build a suitable CustomJS to display the current event in the div model.
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/howto/events_app.py
print_event
def print_event(attributes=[]): """ Function that returns a Python callback to pretty print the events. """ def python_callback(event): cls_name = event.__class__.__name__ attrs = ', '.join(['{attr}={val}'.format(attr=attr, val=event.__dict__[attr]) for attr in att...
python
def print_event(attributes=[]): """ Function that returns a Python callback to pretty print the events. """ def python_callback(event): cls_name = event.__class__.__name__ attrs = ', '.join(['{attr}={val}'.format(attr=attr, val=event.__dict__[attr]) for attr in att...
[ "def", "print_event", "(", "attributes", "=", "[", "]", ")", ":", "def", "python_callback", "(", "event", ")", ":", "cls_name", "=", "event", ".", "__class__", ".", "__name__", "attrs", "=", "', '", ".", "join", "(", "[", "'{attr}={val}'", ".", "format",...
Function that returns a Python callback to pretty print the events.
[ "Function", "that", "returns", "a", "Python", "callback", "to", "pretty", "print", "the", "events", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/examples/howto/events_app.py#L39-L48
train
Returns a Python callback that returns a Python function that prints the 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/protocol/__init__.py
Protocol.create
def create(self, msgtype, *args, **kwargs): ''' Create a new Message instance for the given type. Args: msgtype (str) : ''' if msgtype not in self._messages: raise ProtocolError("Unknown message type %r for protocol version %s" % (msgtype, self._version)) ...
python
def create(self, msgtype, *args, **kwargs): ''' Create a new Message instance for the given type. Args: msgtype (str) : ''' if msgtype not in self._messages: raise ProtocolError("Unknown message type %r for protocol version %s" % (msgtype, self._version)) ...
[ "def", "create", "(", "self", ",", "msgtype", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "msgtype", "not", "in", "self", ".", "_messages", ":", "raise", "ProtocolError", "(", "\"Unknown message type %r for protocol version %s\"", "%", "(", "m...
Create a new Message instance for the given type. Args: msgtype (str) :
[ "Create", "a", "new", "Message", "instance", "for", "the", "given", "type", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/__init__.py#L71-L80
train
Create a new Message instance for the given type.
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/protocol/__init__.py
Protocol.assemble
def assemble(self, header_json, metadata_json, content_json): ''' Create a Message instance assembled from json fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: message ''' ...
python
def assemble(self, header_json, metadata_json, content_json): ''' Create a Message instance assembled from json fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: message ''' ...
[ "def", "assemble", "(", "self", ",", "header_json", ",", "metadata_json", ",", "content_json", ")", ":", "header", "=", "json_decode", "(", "header_json", ")", "if", "'msgtype'", "not", "in", "header", ":", "log", ".", "error", "(", "\"Bad header with no msgty...
Create a Message instance assembled from json fragments. Args: header_json (``JSON``) : metadata_json (``JSON``) : content_json (``JSON``) : Returns: message
[ "Create", "a", "Message", "instance", "assembled", "from", "json", "fragments", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/protocol/__init__.py#L82-L102
train
Assemble a message from json fragments.
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
_combine_document_events
def _combine_document_events(new_event, old_events): ''' Attempt to combine a new event with a list of previous events. The ``old_event`` will be scanned in reverse, and ``.combine(new_event)`` will be called on each. If a combination can be made, the function will return immediately. Otherwise, ``new_...
python
def _combine_document_events(new_event, old_events): ''' Attempt to combine a new event with a list of previous events. The ``old_event`` will be scanned in reverse, and ``.combine(new_event)`` will be called on each. If a combination can be made, the function will return immediately. Otherwise, ``new_...
[ "def", "_combine_document_events", "(", "new_event", ",", "old_events", ")", ":", "for", "event", "in", "reversed", "(", "old_events", ")", ":", "if", "event", ".", "combine", "(", "new_event", ")", ":", "return", "# no combination was possible", "old_events", "...
Attempt to combine a new event with a list of previous events. The ``old_event`` will be scanned in reverse, and ``.combine(new_event)`` will be called on each. If a combination can be made, the function will return immediately. Otherwise, ``new_event`` will be appended to ``old_events``. Args: ...
[ "Attempt", "to", "combine", "a", "new", "event", "with", "a", "list", "of", "previous", "events", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L1131-L1158
train
This function attempts to combine a new event with a list of previous 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.add_next_tick_callback
def add_next_tick_callback(self, callback): ''' Add callback to be invoked once on the next tick of the event loop. Args: callback (callable) : A callback function to execute on the next tick. Returns: NextTickCallback : can be used with ``remove_next_ti...
python
def add_next_tick_callback(self, callback): ''' Add callback to be invoked once on the next tick of the event loop. Args: callback (callable) : A callback function to execute on the next tick. Returns: NextTickCallback : can be used with ``remove_next_ti...
[ "def", "add_next_tick_callback", "(", "self", ",", "callback", ")", ":", "from", ".", ".", "server", ".", "callbacks", "import", "NextTickCallback", "cb", "=", "NextTickCallback", "(", "self", ",", "None", ")", "return", "self", ".", "_add_session_callback", "...
Add callback to be invoked once on the next tick of the event loop. Args: callback (callable) : A callback function to execute on the next tick. Returns: NextTickCallback : can be used with ``remove_next_tick_callback`` .. note:: Next tick c...
[ "Add", "callback", "to", "be", "invoked", "once", "on", "the", "next", "tick", "of", "the", "event", "loop", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L226-L244
train
Add callback to be invoked once on the next tick of the event loop.
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_periodic_callback
def add_periodic_callback(self, callback, period_milliseconds): ''' Add a callback to be invoked on a session periodically. Args: callback (callable) : A callback function to execute periodically period_milliseconds (int) : Number of milliseconds...
python
def add_periodic_callback(self, callback, period_milliseconds): ''' Add a callback to be invoked on a session periodically. Args: callback (callable) : A callback function to execute periodically period_milliseconds (int) : Number of milliseconds...
[ "def", "add_periodic_callback", "(", "self", ",", "callback", ",", "period_milliseconds", ")", ":", "from", ".", ".", "server", ".", "callbacks", "import", "PeriodicCallback", "cb", "=", "PeriodicCallback", "(", "self", ",", "None", ",", "period_milliseconds", "...
Add a callback to be invoked on a session periodically. Args: callback (callable) : A callback function to execute periodically period_milliseconds (int) : Number of milliseconds between each callback execution. Returns: PeriodicCall...
[ "Add", "a", "callback", "to", "be", "invoked", "on", "a", "session", "periodically", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L246-L269
train
Add a callback to be invoked on a session periodically.
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_root
def add_root(self, model, setter=None): ''' Add a model as a root of this Document. Any changes to this model (including to other models referred to by it) will trigger ``on_change`` callbacks registered on this document. Args: model (Model) : The mo...
python
def add_root(self, model, setter=None): ''' Add a model as a root of this Document. Any changes to this model (including to other models referred to by it) will trigger ``on_change`` callbacks registered on this document. Args: model (Model) : The mo...
[ "def", "add_root", "(", "self", ",", "model", ",", "setter", "=", "None", ")", ":", "if", "model", "in", "self", ".", "_roots", ":", "return", "self", ".", "_push_all_models_freeze", "(", ")", "# TODO (bird) Should we do some kind of reporting of how many", "# Lay...
Add a model as a root of this Document. Any changes to this model (including to other models referred to by it) will trigger ``on_change`` callbacks registered on this document. Args: model (Model) : The model to add as a root of this document. ...
[ "Add", "a", "model", "as", "a", "root", "of", "this", "Document", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L271-L305
train
Add a model as a root of 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_timeout_callback
def add_timeout_callback(self, callback, timeout_milliseconds): ''' Add callback to be invoked once, after a specified timeout passes. Args: callback (callable) : A callback function to execute after timeout timeout_milliseconds (int) : Number of...
python
def add_timeout_callback(self, callback, timeout_milliseconds): ''' Add callback to be invoked once, after a specified timeout passes. Args: callback (callable) : A callback function to execute after timeout timeout_milliseconds (int) : Number of...
[ "def", "add_timeout_callback", "(", "self", ",", "callback", ",", "timeout_milliseconds", ")", ":", "from", ".", ".", "server", ".", "callbacks", "import", "TimeoutCallback", "cb", "=", "TimeoutCallback", "(", "self", ",", "None", ",", "timeout_milliseconds", ")...
Add callback to be invoked once, after a specified timeout passes. Args: callback (callable) : A callback function to execute after timeout timeout_milliseconds (int) : Number of milliseconds before callback execution. Returns: Timeo...
[ "Add", "callback", "to", "be", "invoked", "once", "after", "a", "specified", "timeout", "passes", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L307-L330
train
Add a callback to be invoked once after a specified timeout passes.
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.apply_json_patch
def apply_json_patch(self, patch, setter=None): ''' Apply a JSON patch object and process any resulting events. Args: patch (JSON-data) : The JSON-object containing the patch to apply. setter (ClientSession or ServerSession or None, optional) : T...
python
def apply_json_patch(self, patch, setter=None): ''' Apply a JSON patch object and process any resulting events. Args: patch (JSON-data) : The JSON-object containing the patch to apply. setter (ClientSession or ServerSession or None, optional) : T...
[ "def", "apply_json_patch", "(", "self", ",", "patch", ",", "setter", "=", "None", ")", ":", "references_json", "=", "patch", "[", "'references'", "]", "events_json", "=", "patch", "[", "'events'", "]", "references", "=", "instantiate_references_json", "(", "re...
Apply a JSON patch object and process any resulting events. Args: patch (JSON-data) : The JSON-object containing the patch to apply. setter (ClientSession or ServerSession or None, optional) : This is used to prevent "boomerang" updates to Bokeh apps. ...
[ "Apply", "a", "JSON", "patch", "object", "and", "process", "any", "resulting", "events", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L341-L435
train
Applies a JSON patch to any resulting events and returns the new state of the new 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...
bokeh/bokeh
bokeh/document/document.py
Document.clear
def clear(self): ''' Remove all content from the document but do not reset title. Returns: None ''' self._push_all_models_freeze() try: while len(self._roots) > 0: r = next(iter(self._roots)) self.remove_root(r) fi...
python
def clear(self): ''' Remove all content from the document but do not reset title. Returns: None ''' self._push_all_models_freeze() try: while len(self._roots) > 0: r = next(iter(self._roots)) self.remove_root(r) fi...
[ "def", "clear", "(", "self", ")", ":", "self", ".", "_push_all_models_freeze", "(", ")", "try", ":", "while", "len", "(", "self", ".", "_roots", ")", ">", "0", ":", "r", "=", "next", "(", "iter", "(", "self", ".", "_roots", ")", ")", "self", ".",...
Remove all content from the document but do not reset title. Returns: None
[ "Remove", "all", "content", "from", "the", "document", "but", "do", "not", "reset", "title", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L450-L463
train
Remove all content from the document but do not reset title.
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.delete_modules
def delete_modules(self): ''' Clean up after any modules created by this Document when its session is destroyed. ''' from gc import get_referrers from types import FrameType log.debug("Deleting %s modules for %s" % (len(self._modules), self)) for module in self...
python
def delete_modules(self): ''' Clean up after any modules created by this Document when its session is destroyed. ''' from gc import get_referrers from types import FrameType log.debug("Deleting %s modules for %s" % (len(self._modules), self)) for module in self...
[ "def", "delete_modules", "(", "self", ")", ":", "from", "gc", "import", "get_referrers", "from", "types", "import", "FrameType", "log", ".", "debug", "(", "\"Deleting %s modules for %s\"", "%", "(", "len", "(", "self", ".", "_modules", ")", ",", "self", ")",...
Clean up after any modules created by this Document when its session is destroyed.
[ "Clean", "up", "after", "any", "modules", "created", "by", "this", "Document", "when", "its", "session", "is", "destroyed", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L485-L520
train
Delete all modules created by 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.from_json
def from_json(cls, json): ''' Load a document from JSON. json (JSON-data) : A JSON-encoded document to create a new Document from. Returns: Document : ''' roots_json = json['roots'] root_ids = roots_json['root_ids'] references_json = roo...
python
def from_json(cls, json): ''' Load a document from JSON. json (JSON-data) : A JSON-encoded document to create a new Document from. Returns: Document : ''' roots_json = json['roots'] root_ids = roots_json['root_ids'] references_json = roo...
[ "def", "from_json", "(", "cls", ",", "json", ")", ":", "roots_json", "=", "json", "[", "'roots'", "]", "root_ids", "=", "roots_json", "[", "'root_ids'", "]", "references_json", "=", "roots_json", "[", "'references'", "]", "references", "=", "instantiate_refere...
Load a document from JSON. json (JSON-data) : A JSON-encoded document to create a new Document from. Returns: Document :
[ "Load", "a", "document", "from", "JSON", "." ]
dc8cf49e4e4302fd38537ad089ece81fbcca4737
https://github.com/bokeh/bokeh/blob/dc8cf49e4e4302fd38537ad089ece81fbcca4737/bokeh/document/document.py#L525-L548
train
Load a document from a JSON - encoded 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...