infrastructure/load-balancing-for-inference/utils/player-name-file-generator.ts (232 lines of code) (raw):
'use server'
import { createShuffle } from 'fast-shuffle';
import { writeFile } from 'fs';
export const generatePlayerNameFile = () => {
const adjectiveList = [
'Cloud',
'Serverless',
'Secure',
'Scalable',
'Modern',
'Persistent',
'Analytical',
'Enterprise',
'Hybrid',
'Active',
'Asynchronous',
'Consistent',
'Realtime',
'Data-Driven',
'Streamlined',
'Discoverable',
'Maintainable',
'Resilient',
'Conditional',
'Logical',
'Minimum Viable',
'Deployable',
'Accelerated',
'Transformational',
'Monolithic',
'Multicloud',
'Advanced',
'Generative',
'Performant',
'Global',
'Distributed',
'Binary',
'Insightful',
'Non-Relational',
'Synchronous',
'Replicated',
'Multi-Version',
'Balanced',
'Unified',
'Simple',
'Service-Oriented',
'Anonymous',
// CSS Colors
'Alice-Blue',
'Antique-White',
'Aqua',
'Aquamarine',
'Azure',
'Beige',
'Bisque',
'Black',
'Blanched-Almond',
'Blue',
'Blue-Violet',
'Brown',
'Burly-Wood',
'Cadet-Blue',
'Chartreuse',
'Chocolate',
'Coral',
'Cornflower-Blue',
'Cornsilk',
'Crimson',
'Cyan',
'Deep-Pink',
'Deep-Sky-Blue',
'Dodger-Blue',
'Fire-Brick',
'Floral-White',
'Forest-Green',
'Fuchsia',
'Gainsboro',
'Ghost-White',
'Gold',
'Golden-Rod',
'Gray',
'Grey',
'Green',
'Green-Yellow',
'Honey-Dew',
'Hot-Pink',
'Indian-Red',
'Indigo',
'Ivory',
'Khaki',
'Lavender',
'Lavender-Blush',
'Lawn-Green',
'Lemon-Chiffon',
'Lime',
'Lime-Green',
'Linen',
'Magenta',
'Maroon',
'Midnight-Blue',
'Mint-Cream',
'Misty-Rose',
'Moccasin',
'Navajo-White',
'Navy',
'Old-Lace',
'Olive',
'Olive-Drab',
'Orange',
'Orange-Red',
'Orchid',
'Pale',
'Peru',
'Pink',
'Plum',
'Powder-Blue',
'Purple',
'Red',
'Rosy-Brown',
'Royal-Blue',
'Saddle-Brown',
'Salmon',
'Sandy-Brown',
'Sea-Green',
'Sea-Shell',
'Sienna',
'Silver',
'Sky-Blue',
'Slate-Blue',
'Slate-Gray',
'Slate-Grey',
'Snow',
'Spring-Green',
'Steel-Blue',
'Tan',
'Teal',
'Thistle',
'Tomato',
'Turquoise',
'Violet',
'Wheat',
'White',
'White-Smoke',
'Yellow',
'Yellow-Green',
];
const animalList = [
'Alligator',
'Anteater',
'Armadillo',
'Auroch',
'Axolotl',
'Badger',
'Bat',
'Bear',
'Beaver',
'Buffalo',
'Camel',
'Capybara',
'Chameleon',
'Cheetah',
'Chinchilla',
'Chipmunk',
'Chupacabra',
'Cormorant',
'Coyote',
'Crow',
'Dingo',
'Dinosaur',
'Dog',
'Dolphin',
'Duck',
'Elephant',
'Ferret',
'Fox',
'Frog',
'Giraffe',
'Gopher',
'Grizzly',
'Hedgehog',
'Hippo',
'Hyena',
'Ibex',
'Ifrit',
'Iguana',
'Jackal',
'Kangaroo',
'Koala',
'Kraken',
'Lemur',
'Leopard',
'Liger',
'Lion',
'Llama',
'Loris',
'Manatee',
'Mink',
'Monkey',
'Moose',
'Narwhal',
'Nyan Cat',
'Orangutan',
'Otter',
'Panda',
'Penguin',
'Platypus',
'Pumpkin',
'Python',
'Quagga',
'Rabbit',
'Raccoon',
'Rhino',
'Sheep',
'Shrew',
'Skunk',
'Squirrel',
'Tiger',
'Turtle',
'Walrus',
'Wolf',
'Wolverine',
'Wombat',
];
const initialList: string[] = [];
adjectiveList.forEach((adjective) => {
animalList.forEach((animal) => {
initialList.push(`${adjective} ${animal}`)
});
});
const shuffler = createShuffle(12345);
const shuffledList = shuffler(initialList);
writeFile('./utils/player-name-list.ts', `export const playerNameList = ${JSON.stringify(shuffledList)}`, () => { })
}