Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Change this.
- USER_NAME = 'user_name'
- #If you don't want one of the (MAXIMUM 1 anime) in there, remove the # from the bottom 3 to stop mandatory inclusion.
- #If you do that though, you might end up with more than one of the Max 1 anime.
- Stlist = \
- '''
- Aoki Hagane no Arpeggio: Ars Nova
- BlazBlue: Alter Memory
- Coppelion
- Diamond no Ace
- Diabolik Lovers
- Freezing Vibration
- Galilei Donna
- Gingitsune
- Golden Time
- Gundam Build Fighters
- Hajime no Ippo: Rising
- Kakumeiki Valvrave 2nd Season
- Kyousou Giga (TV)
- Little Busters!: Refrain
- Log Horizon
- Machine-Doll wa Kizutsukanai
- Meganebu!
- Nagi no Asukara
- Non Non Biyori
- Ore no Nounai Sentakushi ga, Gakuen Love Comedy wo Zenryoku de Jama Shiteiru
- Outbreak Company
- Phi Brain: Kami no Puzzle 3rd Season
- Pupa
- Samurai Flamenco
- Sekai de Ichiban Tsuyoku Naritai!
- Strike the Blood
- Tokyo Ravens
- Walkure Romanze
- White Album 2
- Yowamushi Pedal
- Yozakura Quartet: Hana no Uta
- Yuusha ni Narenakatta Ore wa Shibushibu Shuushoku wo Ketsui Shimashita.
- #IS: Infinite Stratos 2
- #Kuroko no Basket 2
- #Magi: The Kingdom of Magic
- '''
- import random
- f = Stlist.split('\n')
- y = []
- final_collection = []
- #Shouldn't need this because of random numbers but just in case.
- unique_ness = set()
- one_only = set()
- for line in f:
- if not line: continue
- li = line.strip()
- if li[0] == '#':
- one_only.add(li[1:])
- y.append(li[1:])
- else:
- y.append(li)
- count = 0
- y_index = len(y) - 1
- chosen = False;
- #This will make us a list of 6 anime but we require 7. This is because we want to make sure
- #we get a bad boy one only person in there.
- while (count < 6):
- ran_int = random.randint(0,y_index)
- if y[ran_int] in one_only and chosen:
- continue
- if y[ran_int] not in unique_ness:
- if y[ran_int] in one_only:
- chosen = True;
- unique_ness.add(y[ran_int])
- final_collection.append(y[ran_int])
- count += 1
- #Make sure we get at least one 'one only' bad boy in there.
- if not chosen and len(one_only) > 0:
- temp = list(one_only)
- ran_int = random.randint(0,len(temp)-1)
- final_collection.append(temp[ran_int])
- else:
- while (count < 7):
- ran_int = random.randint(0,y_index)
- if y[ran_int] in one_only:
- continue
- if y[ran_int] not in unique_ness:
- unique_ness.add(y[ran_int])
- final_collection.append(y[ran_int])
- count += 1
- #print(final_collection)
- output = 'Team: %s' % USER_NAME
- for i in final_collection:
- output += '\n'
- output += i
- output += '\n'
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement