Last year I faced this Google Colab issue wherein during my model training time(which took over 6 hours), my notebook kept disconnecting due to inactivity.
Wrote this small script to keep my session and in turn my system active.
from pynput.mouse import Button, Controller
import time
mouse = Controller()
while True:
mouse.click(Button.left, 1)
time.sleep(30)
Top comments (1)
where do I put this?