Is there any way to pause Google Colab? - google-colaboratory

Since I can't keep colab running without interracting with it, I would like to pause my session. If I press the stop button, I'll lose what's been done in the running cell so far. Is there some way to avoid this?

Related

How to solve Mouse over error in Selenium IDE Script Recording

I'm new to selenium. Currently trying to automate the testing process of a react Django based app using selenium script recording in selenium IDE. I'm facing repeated issues in mouse click parts.
After i record the process and run it, it breaks in a mouse click script. My testing software have a create, update and delete function. most probably the error comes in clicking the update and delete button. So, right now i'm using Tab button to reach update and delete button which is a little time consuming in the recording process.
The above given image is where i get the error
The below is the log of the error
Is there any way to overcome this issue or any way to change the script on the error part to make it right.
Also, it would be kind if you suggest me any other best way to automate testing of my react application other than this way.

Jitbit Macro Recorder - IF Image statement, why it is not waiting until the image appears?

I am using Jitbit MacroRecorder and it is a really helpful tool. The problem is this: By using the IF image found feature, I want the program to execute 2 sequential commands as soon as the image I selected on my screen appears. However, the program is putting too much load on the CPU by running thousands of times until the IF statement is true. What I want is for the program to WAIT until the image in the IF image found statement appears on the screen, that is, not to run thousands of times.
My simple code
The only way for the program to know when the image appears is to continuously "scan" the screen until it sees it. You may be able to use the image NOT found feature inside a loop with a delay. You would look for the image, and if not found, delay a second, and then look for it again. The tradeoff is you will have that delay in there which will keep your program from running the following commands immediately.

How to prevent colab Resources tab from showing?

I'm using google colab pro, and irritatingly, the Resources tab keeps showing itself after I've closed it. It doesn't appear to be showing me anything new, and it is not in response to any action. It just randomly pops up every few minutes no matter how often I've closed it. I can collapse the divider down so that it is small, and it stays, but that is a work-around. Why does it keep popping up, and is there a way to prevent it?
Figured it out. It looks like it was the Colab Alive chrome extension trying to do its job. I removed the extension, and that fixed my problem.

Colab audio alarm or pop up notification to remind the user to click captcha button when popped up, prevent inactivity

From March 2021 google colab has added a captcha that randomly pops up after some time. So it is difficult or not possible to programmatically prevent Google Colab from disconnecting on a timeout. So there's no option other than opening the tab and clicking the captcha button. I often run model which take more training time and sometimes miss going back to it in 90 mins. The captcha can be popped up even while the training is not completed and soon terminates after a few minutes if not clicked.
Are there any solutions so that I can at least get an audio notification when I get a captcha in colab or if not pop-up message in browser or OS so that I can know about the inactivity?
I had found some ways get notified at some target lines in the notebook, say after training is completed. One is the colab browser notification feature, can be checked to true in settings. Other one is an audio solution, you just add these 2 lines of code found here to get an alarm when the code executes at any line in a cell.
What I am looking for is an alarm or pop up message in case of captcha.
This is probably a half-correct answer, but here's my shot at solving this
This article discusses how to bypass Captcha's, and has some code that clicks the check box if a captcha is found. I think it could be modified to have a sound alert instead.
However, Captchas were made to counter these sort of tools, plus I'm not sure about the legality implications etc, so I wouldn't recommend it.
The use of the below js increased the time before google sent a recaptcha for me. Btw, I set this as a bookmark, to call it whenever I need to. Executing the js bit in the console should be equivalent.
javascript:void(setInterval(function(){ console.log("Connect pushed"); document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click(); },60000))

How to terminate Google Colab correctly?

I found
!kill -9 -1
it seems not working correctly.
When I do many tasks simultaneously on colab,
popup appears and asks me like this,
"Memory usage is close to the limit. terminate other? "
and after click yes, GPU gets much faster,
seems initialized correctly.
My question is,
how to call that popup by myself.
To see a list of running sessions along with the memory allocated to them and an option to terminate, follow these instructions.
Make sure notebook is connected to an active runtime.
Click on "Runtime" in the menu bar.
Clink on "Manage sessions" in the menu that appears.
The window that pops up lists your active sessions.