Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
thelou1s
/
yamnet_test
like
1
Running
App
Files
Files
Community
97249f0
yamnet_test
/
python
/
util
/
str_util.py
Luis
init2
97249f0
10 months ago
raw
history
blame
No virus
149 Bytes
def
truncate_str
(
the_str, the_max
):
return
the_str[:the_max]
if
len
(the_str) > the_max
else
the_str
def
format_float
(
f
):
return
'%.2f'
% f