first commit

main
Skye 2 years ago
commit 8eff55bbab
Signed by: me
GPG Key ID: 0104BC05F41B77B8

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
[{"choices":[{"nextNgram":0,"nextChar":"a","cumulativeProbability":2},{"nextNgram":1,"nextChar":"m","cumulativeProbability":3}],"totalProbability":3,"name":"aa"},{"choices":[{"nextNgram":7,"nextChar":"r","cumulativeProbability":3},{"nextNgram":6,"nextChar":"e","cumulativeProbability":4}],"totalProbability":4,"name":"am"},{"choices":[{"nextNgram":8,"nextChar":"y","cumulativeProbability":1}],"totalProbability":1,"name":"an"},{"choices":[{"nextNgram":9,"nextChar":"w","cumulativeProbability":1}],"totalProbability":1,"name":"ao"},{"choices":[{"nextNgram":9,"nextChar":"w","cumulativeProbability":1}],"totalProbability":1,"name":"eo"},{"choices":[{"nextNgram":21,"nextChar":"m","cumulativeProbability":6},{"nextNgram":22,"nextChar":"n","cumulativeProbability":7},{"nextNgram":23,"nextChar":"p","cumulativeProbability":8}],"totalProbability":8,"name":"ew"},{"choices":[{"nextNgram":4,"nextChar":"o","cumulativeProbability":3},{"nextNgram":5,"nextChar":"w","cumulativeProbability":5}],"totalProbability":5,"name":"me"},{"choices":[{"nextNgram":16,"nextChar":"o","cumulativeProbability":15},{"nextNgram":12,"nextChar":"a","cumulativeProbability":24},{"nextNgram":18,"nextChar":"r","cumulativeProbability":28},{"nextNgram":19,"nextChar":"w","cumulativeProbability":29},{"nextNgram":13,"nextChar":"e","cumulativeProbability":30}],"totalProbability":30,"name":"mr"},{"choices":[{"nextNgram":26,"nextChar":"a","cumulativeProbability":1}],"totalProbability":1,"name":"ny"},{"choices":[{"nextNgram":21,"nextChar":"m","cumulativeProbability":22},{"nextNgram":24,"nextChar":"r","cumulativeProbability":32},{"nextNgram":22,"nextChar":"n","cumulativeProbability":36},{"nextNgram":25,"nextChar":"w","cumulativeProbability":37},{"nextNgram":23,"nextChar":"p","cumulativeProbability":38}],"totalProbability":38,"name":"ow"},{"choices":[{"nextNgram":11,"nextChar":"u","cumulativeProbability":1}],"totalProbability":1,"name":"pp"},{"choices":[{"nextNgram":20,"nextChar":"r","cumulativeProbability":1}],"totalProbability":1,"name":"pu"},{"choices":[{"nextNgram":3,"nextChar":"o","cumulativeProbability":1}],"totalProbability":1,"name":"ra"},{"choices":[{"nextNgram":4,"nextChar":"o","cumulativeProbability":1}],"totalProbability":1,"name":"re"},{"choices":[{"nextNgram":7,"nextChar":"r","cumulativeProbability":1},{"nextNgram":6,"nextChar":"e","cumulativeProbability":2}],"totalProbability":2,"name":"rm"},{"choices":[{"nextNgram":8,"nextChar":"y","cumulativeProbability":1}],"totalProbability":1,"name":"rn"},{"choices":[{"nextNgram":9,"nextChar":"w","cumulativeProbability":1}],"totalProbability":1,"name":"ro"},{"choices":[{"nextNgram":10,"nextChar":"p","cumulativeProbability":1}],"totalProbability":1,"name":"rp"},{"choices":[{"nextNgram":18,"nextChar":"r","cumulativeProbability":7},{"nextNgram":14,"nextChar":"m","cumulativeProbability":10},{"nextNgram":16,"nextChar":"o","cumulativeProbability":13},{"nextNgram":17,"nextChar":"p","cumulativeProbability":14}],"totalProbability":14,"name":"rr"},{"choices":[{"nextNgram":21,"nextChar":"m","cumulativeProbability":1}],"totalProbability":1,"name":"rw"},{"choices":[{"nextNgram":18,"nextChar":"r","cumulativeProbability":1}],"totalProbability":1,"name":"ur"},{"choices":[{"nextNgram":7,"nextChar":"r","cumulativeProbability":17},{"nextNgram":6,"nextChar":"e","cumulativeProbability":30}],"totalProbability":30,"name":"wm"},{"choices":[{"nextNgram":8,"nextChar":"y","cumulativeProbability":1}],"totalProbability":1,"name":"wn"},{"choices":[{"nextNgram":11,"nextChar":"u","cumulativeProbability":1}],"totalProbability":1,"name":"wp"},{"choices":[{"nextNgram":14,"nextChar":"m","cumulativeProbability":7},{"nextNgram":15,"nextChar":"n","cumulativeProbability":10}],"totalProbability":10,"name":"wr"},{"choices":[{"nextNgram":25,"nextChar":"w","cumulativeProbability":3},{"nextNgram":21,"nextChar":"m","cumulativeProbability":4}],"totalProbability":4,"name":"ww"},{"choices":[{"nextNgram":0,"nextChar":"a","cumulativeProbability":4},{"nextNgram":2,"nextChar":"n","cumulativeProbability":5},{"nextNgram":1,"nextChar":"m","cumulativeProbability":6}],"totalProbability":6,"name":"ya"}]

File diff suppressed because one or more lines are too long

@ -0,0 +1,119 @@
import json
from random import randint, choice
def load_json(filename):
with open(filename) as f:
return json.load(f)
actions = [
"*tilts head*",
"*twitches ears slightly*",
"*purrs*",
"*falls asleep*",
"*sits on ur keyboard*",
"*nuzzles*",
"*stares at u*",
"*points towards case of monster zero ultra*",
"*sneezes*",
"*plays with yarn*",
"*eats all ur doritos*",
"*lies down on a random surface*",
]
catgirl_table = load_json("catgirl_nonsense.json")
keymash_table = load_json("keyboard_mash.json")
scrunkly_table = load_json("aww_the_scrunkly.json")
def gen_uwu():
return "uwu"
def gen_colon_three():
return ":3"
def gen_owo():
return "owo"
def gen_nyaa():
return "ny" + ("a" * randint(1, 6))
def gen_blush():
return ">" + ("/" * randint(3, 6)) + "<"
def gen_actions():
return choice(actions)
def gen_screaming():
return "A" * randint(5, 16)
def gen_catgirl_nonsense():
result = "mr"
state = 7
for _ in range(randint(25, 149)):
rand = randint(0, catgirl_table[state]["totalProbability"] - 1)
for choice in catgirl_table[state]["choices"]:
if choice["cumulativeProbability"] > rand:
result += choice["nextChar"]
state = choice["nextNgram"]
break
result += "nya"
return result
def gen_keyboard_mash():
result = ""
state = randint(0, len(keymash_table) - 1)
for _ in range(randint(25, 149)):
rand = randint(0, keymash_table[state]["totalProbability"] - 1)
for choice in keymash_table[state]["choices"]:
if choice["cumulativeProbability"] > rand:
result += choice["nextChar"]
state = choice["nextNgram"]
break
return result
def gen_scrunkly():
result = "aw"
state = 37
for _ in range(randint(25, 99)):
rand = randint(0, scrunkly_table[state]["totalProbability"] - 1)
for choice in scrunkly_table[state]["choices"]:
if choice["cumulativeProbability"] > rand:
result += choice["nextChar"]
state = choice["nextNgram"]
break
return result
generators = [
gen_uwu,
gen_colon_three,
gen_owo,
gen_nyaa,
gen_blush,
gen_actions,
gen_screaming,
gen_catgirl_nonsense,
gen_keyboard_mash,
gen_scrunkly,
]
prev = None
cur = None
while True:
prev = cur
cur = choice(generators)
while cur == prev:
cur = choice(generators)
print(cur(), end=" ")
Loading…
Cancel
Save