This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from time import sleep, time | |
import miio | |
from prometheus_client import start_http_server, Gauge | |
if __name__ == '__main__': | |
MONITOR_IP = '192.168.88.100' | |
MONITOR_TOKEN = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_part(file_hash, part_number, quality, timeout) | |
-- Trying to select the requested fragment | |
local t = v.fragments_space.index.main:select(file_hash, part_number, quality) | |
-- If it exists — returning immediately | |
if t ~= nil then | |
return t | |
end | |
-- Creating a key to identify the requested fragment, and an ipc channel, then writing it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_part(file_hash, part_number, quality, timeout) | |
-- Trying to select the requested fragment | |
local t = v.fragments_space.index.main:select(file_hash, part_number, quality) | |
-- If it exists — returning immediately | |
if t ~= nil then | |
return t | |
end | |
-- Creating a key to identify the requested fragment, and an ipc channel, then writing it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(1); |