Skip to content

Instantly share code, notes, and snippets.

@rumbis
Forked from amrrs/avoid_colab_close.js
Created September 29, 2023 14:35
Show Gist options
  • Select an option

  • Save rumbis/8f7358d554da3c3d773ac13a720d1c1f to your computer and use it in GitHub Desktop.

Select an option

Save rumbis/8f7358d554da3c3d773ac13a720d1c1f to your computer and use it in GitHub Desktop.

Revisions

  1. @amrrs amrrs created this gist Aug 17, 2021.
    14 changes: 14 additions & 0 deletions avoid_colab_close.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    //credit - https://huggingface.co/blog/fine-tune-wav2vec2-english (Patrick von Platen)

    // run this on your Chrome / Browser Console (where Colab is present)

    function ConnectButton(){
    console.log("Connect pushed");
    document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
    }

    var colab = setInterval(ConnectButton,60000);

    // uncomment the below line and use it for clearing

    //clearInterval(colab)