Created
July 21, 2020 20:51
-
-
Save seanavery/748ab40c426468f0931f320ef424a5b0 to your computer and use it in GitHub Desktop.
push connect button in loop to prevent google colab session from dying
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: https://stackoverflow.com/questions/57113226/how-to-prevent-google-colab-from-disconnecting | |
// author: Tanay Karve | |
function ConnectButton(){ | |
console.log("Connect pushed"); | |
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click() | |
} | |
setInterval(ConnectButton,60000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment