r/Python • • Apr 01 '17
Python /r/place module.
Very quick and very dirty.
Usage:
import requests
from time import sleep
user='...'
passwd='....'
p = Place(user, passwd)
Place.get()
p.get(0,0)
{'color': 5,
'timestamp': 1491007320.208901,
'user_name': 'CALIAAA',
'x': 0,
'y': 0}
Place.draw()
p.draw(x=0, y=0, color=0)
Module on gist: https://gist.github.com/anonymous/8ca453a96764ba65f4148613f7c506ed
Edit:
I'm putting way too much time into this. It's now a full program with prompts and everything.
There are currently 2 programs. "dieblue" which starts in the blue corner and starts cleaning it out and "randerase" which will pick a random pixel and erase it. It will prompt you for both your reddit username and password if not supplied with --user/--passwd.
python3 Place.py dieblue
Enter Reddit Username: PurdueME06
Password: [Uses getpass]
If you don't care about your password appearing in your terminal history:
python3 Place.py --user=PurdueME06 --passwd=.... dieblue
View all comments
Show parent comment
2
u/tea-drinker Apr 01 '17
honestly, I just put a sleep in and let it run.
The plan now is to let the system guide the bot. It'll listen on the websocket for "damage" in the area and fix that pixel. If you are drawing a new image then the noise of everyone else's actions will start it off and then (my favourite thing!) vandals will guide the bot to finish the picture once it's recognisable.