python program to keep your computer awake

import time
import mouse
import random
while True:
    get_position_of_mouse = mouse.get_position()
    time.sleep(10)
    new_position = mouse.get_position()
    go_to = random.randint(10,300)
    if get_position_of_mouse == new_position:
       mouse.move(go_to,go_to)
#if you know how to check if the user is typing something but not using mouse you can 
#add that feature also

Here is what the above code is Doing:
1. It is checking the position of the mouse every 10 seconds.
2. If the position of the mouse is same as it was 10 seconds ago, it will move the mouse to a random position.
3. If the position of the mouse is different, it will wait for 10 seconds and check again.
4. If you know how to check if the user is typing something but not using mouse you can add that feature also.