Skip to content

Commit

Permalink
remove bad 4 letter words
Browse files Browse the repository at this point in the history
  • Loading branch information
jayshrivastava committed Apr 18, 2024
1 parent dcacf7b commit 1f63522
Show file tree
Hide file tree
Showing 6 changed files with 1,985 additions and 1,746 deletions.
6 changes: 3 additions & 3 deletions make_deny_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
line = line.strip().lower()
if not line.isalpha():
continue
if not (len(line) > 2 and len(line) < 4):
if not (len(line) > 3 and len(line) < 5):
continue
if line.lower() not in words:
if line.lower() not in words and line[:3] not in words:
newlines.append(line)

with open("words_deny_list.txt", "w") as f:
with open("words_deny_list_2.txt", "w") as f:
f.write('\n'.join(newlines))
9 changes: 8 additions & 1 deletion make_words_rs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Process each line
deny_words = []
deny_f = open("words_deny_list.txt")
deny_f = open("words_deny_list_3.txt")
deny_lines_raw = deny_f.readlines()
for i, line in enumerate(deny_lines_raw):
if len(line) > 0:
deny_words.append(line.strip().upper())
deny_f.close()

deny_f_2 = open("words_deny_list_4.txt")
deny_lines_raw = deny_f_2.readlines()
for i, line in enumerate(deny_lines_raw):
if len(line) > 0:
deny_words.append(line.strip().upper())
Expand Down
2 changes: 1 addition & 1 deletion src/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn get_seed() -> [u8; 32] {

// Concatenate the date components to form the seed value
if year == 2024 && month == 4 && day == 18 {
year = 7025
year = 7026
}
let seed: [u32; 8] = [year, month, day, 0, 0, 0, 0, 0];
let mut seed_bytes = [0u8; 32];
Expand Down
Loading

0 comments on commit 1f63522

Please sign in to comment.