MCPcopy Create free account
hub / github.com/Royalvice/DocDiff / randomtext

Function randomtext

utils/marker.py:18–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def randomtext():
19 def GBK2312():
20 head = random.randint(0xb0, 0xf7)
21 body = random.randint(0xa1, 0xfe)
22 val = f'{head:x}{body:x}'
23 strr = bytes.fromhex(val).decode('gb2312',errors="ignore")
24 return strr
25
26 def randomABC():
27 A = np.random.randint(65, 91)
28 a = np.random.randint(97, 123)
29 char = chr(A) + chr(a)
30 for i in range(3):
31 char = char + str(np.random.randint(0, 9))
32 return char
33
34 char = randomABC()
35 for i in range(5):
36 char = char + GBK2312()
37 return char
38
39
40def randomcolor():

Callers 1

mainFunction · 0.85

Calls 2

randomABCFunction · 0.85
GBK2312Function · 0.85

Tested by

no test coverage detected