Matthias Bisping a54ccb2fdf Refactoring: Move
Move text generation funtions into their own module
2023-02-01 17:15:41 +01:00

27 lines
523 B
Python

import random
from faker import Faker
from synthesis.random import rnd
def generate_random_words(n_min, n_max):
words = " ".join(Faker().words(rnd.randint(n_min, n_max)))
return words
def generate_random_number():
return str(
round(
random.choice(
[
random.randint(-10000, 10000),
random.uniform(-100, 100),
]
),
random.choice(
[0, 1, 2, 3],
),
)
)