This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
bruges.py
87 lines (74 loc) · 1.48 KB
/
bruges.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*- coding: utf-8 -*-
"""
Make random text for Bruges.
Use bruges itself eventually.
"""
def get_bruges(p, n):
if p < 0:
p = 0
if p > 1:
p = 1
if n < 0:
n = 0
if n > 4:
n = 4
b = [
"box",
"bevy",
"buttload",
"billions",
"bunch",
"ball",
"bucket",
"bowlful",
"barrowload",
]
r = [
"ridiculously",
"rather",
"reasonably",
"regrettably",
"resolutely",
"riotously",
"reassuringly",
"rarely",
"risible or"
]
u = [
"unlikely",
"untested",
"unusable",
"undocumented",
"uninteresting",
"unexpected",
"untrue",
"unbelievable",
"useless"
]
s = [
", supposedly",
", sorta",
" or something",
" and shit",
", surprisingly",
" and so on",
" and such",
", see?",
", stupid"
]
B = "bag"
R = "really"
U = "useful"
S = " and stuff"
import random
if random.random() < p:
words = random.sample([0, 1, 2, 3], n)
if 0 in words:
B = random.choice(b)
if 1 in words:
R = random.choice(r)
if 2 in words:
U = random.choice(u)
if 3 in words:
S = random.choice(s)
return "{} of {} {} geophysical equations{}".format(B, R, U, S)