(length=8, suffix='')
| 12 | |
| 13 | |
| 14 | def rand_name(length=8, suffix=''): |
| 15 | name = binascii.b2a_hex(os.urandom(length)).decode('utf-8') |
| 16 | if suffix: |
| 17 | if not suffix.startswith('.'): |
| 18 | suffix = '.' + suffix |
| 19 | name += suffix |
| 20 | return name |
| 21 | |
| 22 | |
| 23 | def cache_video(tensor, |