Skip to content
Snippets Groups Projects
Commit bd789ba8 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Util] add random_string

parent e490040f
No related branches found
No related tags found
No related merge requests found
import random
import string
import numpy as np
import onnx
......@@ -26,3 +29,9 @@ def remove_by_name(container, name, name_field="name"):
item = get_by_name(container, name, name_field)
if item is not None:
container.remove(item)
def random_string(stringLength=6):
"""Randomly generate a string of letters and digits."""
lettersAndDigits = string.ascii_letters + string.digits
return "".join(random.choice(lettersAndDigits) for i in range(stringLength))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment