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
// This function converts the byte to the corresponding amount, be it kilo, mega, GB, etc. | |
const convertWeightByte = (byte) => { | |
let sizekiloByte = (byte / 1024); | |
let sizeMega = (sizekiloByte / 1024); | |
let sizeGigabyte = (sizeMega / 1024); | |
let sizeTerabyte = (sizeGigabyte / 1024); | |
let sizePetabyte = (sizeTerabyte / 1024); | |
let sizeExabyte = (sizePetabyte / 1024); | |
if(sizekiloByte > 0 && sizekiloByte <= 1024){ |
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
from pprint import pprint | |
import json | |
import sys | |
import os | |
DATA_TYPES = { | |
"S": lambda x: str(x), | |
"B": lambda x: bool(x), | |
"N": lambda x: str(x), |