This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
0
Random isn't random enough...
Post Flair (click to view more posts with a particular flair)
Post Body
So I've got a script that generates random "filler" from a database. But the generated list isn't random enough. Here's a sample output:
00:02:45 - Trailer: The Baby (1973) - URL for Item
00:02:36 - Burlesque: Jenny Lee - URL for Item
00:07:10 - Cartoon: It's a Greek Life - URL for Item
00:02:53 - Trailer: The Sinister Urge - URL for Item
00:00:60 - Short: Kevin Ryan - Coney Island Merman IPA - URL for Item
00:02:25 - Burlesque: Cherry Knight - URL for Item
00:03:06 - Burlesque: Chris LaChris - URL for Item
00:00:48 - Short: Save Free TV - URL for Item
00:08:33 - Cartoon: The Headless Horseman - URL for Item
00:01:46 - Trailer: Attack of the 50ft Woman - URL for Item
00:01:50 - Trailer: Fiend Without A Face - URL for Item
00:01:55 - Trailer: The Zombies of Mora Tau - URL for Item
00:03:33 - Short: Pipe Dream (2001) - URL for Item
00:06:56 - Cartoon: The Goose That Laid the Golden Egg - URL for Item
00:07:18 - Cartoon: The Henpecked Rooster - URL for Item
00:07:09 - Cartoon: It's Got Me Again - URL for Item
00:10:20 - Cartoon: Snails - URL for Item
00:00:11 - Short: Bizarre TV Advert Bumper - URL for Item
00:00:59 - Short: Kevin Ryan - Left Hand Milk Stout - URL for Item
00:02:19 - Short: Cats vs Zombies - URL for Item
00:00:39 - Commercial: Head Shrinker - URL for Item
It starts out fine, but then it starts to get "stuck" on a category (like Trailers or Cartoons).
Is there any way to stop it from choosing the same category twice in a row? Even better would be if it ran through a majority of the categories before duplicating one (it already doesn't duplicate actual entries).
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/bash/commen...