<s> import os <EOL> import subprocess <EOL> import psutil <EOL> from datetime import datetime <EOL> from flask import Blueprint , render_template , redirect , url_for , flash <EOL> from flask . ext . babel import gettext <EOL> mod = Blueprint ( '<STR_LIT>' , __name__ ) <EOL> @ mod . route ( '<STR_LIT:/>' ) <EOL> def index ( ) : <EOL> uptime = datetime . now ( ) - datetime . fromtimestamp ( psutil . get_boot_time ( ) ) <EOL> return render_template ( '<STR_LIT>' , <EOL> uptime = str ( uptime ) . split ( '<STR_LIT:.>' ) [ <NUM_LIT:0> ] , <EOL> load = os . getloadavg ( ) , <EOL> net = psutil . net_io_counters ( ) , <EOL> memory = psutil . virtual_memory ( ) , <EOL> swap = psutil . swap_memory ( ) , <EOL> ) <EOL> @ mod . route ( '<STR_LIT>' ) <EOL> def shutdown ( ) : <EOL> flash ( gettext ( "<STR_LIT>" ) ) <EOL> subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> return redirect ( url_for ( '<STR_LIT>' ) ) <EOL> @ mod . route ( '<STR_LIT>' ) <EOL> def reboot ( ) : <EOL> flash ( gettext ( "<STR_LIT>" ) ) <EOL> subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> return redirect ( url_for ( '<STR_LIT>' ) ) </s>
