⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.114
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
landscape
/
lib
/
View File Name :
format.py
import inspect def format_object(object): """ Returns a fully-qualified name for the specified object, such as 'landscape.lib.format.format_object()'. """ if inspect.ismethod(object): # FIXME If the method is implemented on a base class of # object's class, the module name and function name will be # from the base class and the method's class name will be from # object's class. name = repr(object).split(" ")[2] return "%s.%s()" % (object.__module__, name) elif inspect.isfunction(object): name = repr(object).split(" ")[1] return "%s.%s()" % (object.__module__, name) return "%s.%s" % (object.__class__.__module__, object.__class__.__name__) def format_delta(seconds): if not seconds: seconds = 0.0 return "%.02fs" % float(seconds) def format_percent(percent): if not percent: percent = 0.0 return "%.02f%%" % float(percent)