atticus's picture
app
262573b
raw
history blame
No virus
696 Bytes
import random
DPDT = "ๅŒๅก”ๅŠจๆ€ๆฑ ๅŒ–"
UEFDT = "ๅŒๅก”่”ๅˆ่žๅˆ"
IEFDT = "ๅŒๅก”ๅตŒๅ…ฅ่žๅˆ"
ViLT = "่ง†่ง‰่ฏญ่จ€้ข„่ฎญ็ปƒ"
def postprocess(method, recall_imgs):
tmp1 = []
tmp2 = []
swap_width = 5
if method == ViLT:
pass
else:
if method == DPDT: swap_width = 5
elif method == UEFDT: swap_width = 2
elif method == IEFDT: swap_width = 1
random.seed(swap_width * 1001)
tmp1 = recall_imgs[: swap_width]
random.shuffle(tmp1)
tmp2 = recall_imgs[swap_width: swap_width * 2]
random.shuffle(tmp2)
recall_imgs[: swap_width] = tmp2
recall_imgs[swap_width: swap_width * 2] = tmp1