Skip to content

Utility scripts and functions to handle CodeMarathon 2.0.

Notifications You must be signed in to change notification settings

yev-kanivets/cm2_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Marathon 2.0 Utils

Utility scripts and functions to handle CodeMarathon 2.0.

Firebase Could Functions

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.

Background connectivity checking

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

Plotting statistic

statistic.py gets data from Firebase DB snapshot file and creates plots for each participant with dynamic of rating change.

Running a jar

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.

About

Utility scripts and functions to handle CodeMarathon 2.0.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published