Utility scripts and functions to handle CodeMarathon 2.0.
Actually there is only one function that is being called by Zapier integration, when new user is registered. Located under code_marathon_2.0
folder.
Code Marathon server application was run on Raspberry PI connected to the Internet the home Wi-Fi router. It was continiosly being disconnecting and not reconnecting for some reason. So I wrote the script to reconfigure Raspberry's Wi-Fi adapter automatically is it's broken.
while true:
response = os.system("ping -c 1 https://google.com")
if response == 0:
print("Connected to Internet")
else:
wpa_cli -i wlan0 reconfigure
statistic.py
gets data from Firebase DB snapshot file and creates plots for each participant with dynamic of rating change.
To run a server application, compiled to jar file, following command can be used:
java -jar <name>.jar > output.log 2>&1 &
It will run a background process and redirect all output to output.log
file.