Last active
March 4, 2025 03:19
-
-
Save svmihar/8e1db06407749e918f9a273370c8a3fd to your computer and use it in GitHub Desktop.
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
""" | |
12 hour colab session buat lab komputer | |
""" | |
import webbrowser | |
import string | |
import time | |
import random | |
import fire | |
import pyautogui | |
import sys | |
def check(): | |
print('Press Ctrl-C to quit.') | |
try: | |
while True: | |
x, y = pyautogui.position() | |
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4) | |
print(positionStr, end='') | |
print('\b' * len(positionStr), end='', flush=True) | |
except KeyboardInterrupt: | |
print('\n') | |
def reconnect(n): | |
time.sleep(n) | |
print(f'clicking reconnect for {n} seconds') | |
pyautogui.doubleClick(1693, 213, interval=.5) | |
def textbox(n): | |
print(f'clicking textbox waiting for {n} seconds') | |
time.sleep(n) | |
pyautogui.click(1466, 966) | |
def main(): | |
reconnect(60) | |
def run(link = 'INSERT COLAB LINK HERE'): | |
webbrowser.open(link) | |
i = 0 | |
print('checking on position of ram and disk') | |
reconnect(2) | |
while True: | |
main() | |
i+=1 | |
print(i) | |
if __name__ == "__main__": | |
fire.Fire() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment