Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pretty size python

def human_size(bytes, units=[' bytes','KB','MB','GB','TB', 'PB', 'EB']):
    return str(bytes) + units[0] if bytes < 1024 else human_size(bytes>>10, units[1:])
Comment

PREVIOUS NEXT
Code Example
Python :: .launch.py file in ros2 
Python :: python cv2 imwrite 
Python :: python not equal 
Python :: bs4 class 
Python :: disable close button in tkinter 
Python :: get count of values in column pandas 
Python :: shift list python 
Python :: python slice notation 
Python :: selenium webdriver scroll down python 
Python :: read a file python 
Python :: open csv from url python 
Python :: how to for loop for amount in list python 
Python :: dataframe to dictionary using index as key 
Python :: how to restart loop python 
Python :: how to dump a database using manage.py 
Python :: create an empty numpy array and append 
Python :: python sum of list 
Python :: ord python 
Python :: how to get the type of numpy array 
Python :: seaborn Using the dark theme python 
Python :: create pyspark dataframe from list 
Python :: decimal to octal in python 
Python :: round list python 
Python :: how to get all possible combinations in python 
Python :: save turtle programming python 
Python :: python get current date 
Python :: feature selection python 
Python :: planets list 
Python :: Upper letter list 
Python :: how to make an int into a string python 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =