MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / str_rand

Function str_rand

serving/processor/tests/flatbuf_test/python/perf.py:20–27  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

18from pb import tf_request_pb2 as tf_pb
19
20def str_rand(length) :
21 seed = "1234567890abcdefghijklmnopqrstuvwxyz" \
22 "ABCDEFGHIJKLMNOPQRSTUVWXYZ_-"
23 sa = []
24 for i in range(length):
25 sa.append(random.choice(seed))
26
27 return ''.join(sa)
28
29def main():
30 # prepare data -------------------------

Callers 1

mainFunction · 0.85

Calls 3

rangeFunction · 0.50
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected