does running google colab locally prevent disconnection code example

Example 1: stop colab from disconnecting medium

function ClickConnect(){console.log("Working"); document.querySelector("colab-toolbar-button").click() }setInterval(ClickConnect,60000)

Example 2: how to run colab in background

# ctrl + shift + i
# then in the console tab write this:
(setInterval(function(){ console.log("Connect pushed"); document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click(); },60000))

Tags:

Go Example