Skip to content

Instantly share code, notes, and snippets.

View kernelkaribou's full-sized avatar

kernelkaribou

View GitHub Profile
@kernelkaribou
kernelkaribou / datatype.py
Last active August 31, 2017 17:28 — forked from cbattlegear/bandwidth.py
Quick Bandwidth Format function
#Formatting of data sent in bytes to label in largest size
def format_data_type(i, type):
loop = 0
current_num = i
last_num = 0
if type == "net":
label = ["Bps", "KBps", "MBps", "GBps"]
if type == "size":
label = ["B", "KB", "MB", "GB", "TB"]
while(True):