-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
40 lines (35 loc) · 820 Bytes
/
utils.py
File metadata and controls
40 lines (35 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import random
def generate_words(word_count: int):
"""
Generate a string of random words separated by spaces.
Args:
word_count (int): The number of words to generate.
Returns:
str: A string of random words.
"""
random_words = [
"python",
"developer",
"terminal",
"keyboard",
"docker",
"react",
"cloud",
"system",
"performance",
"latency",
"database",
"backend",
"frontend",
"typescript",
"graphql",
"microservice",
"distributed",
]
return " ".join(random.choices(random_words, k=(word_count + 20)))
def clear_terminal():
"""
Clear the terminal screen.
"""
os.system("cls" if os.name == "nt" else "clear")