Best Python code snippet using websmith_python
01.py
Source:01.py
1test = {2 'name': 'Problem 1',3 'points': 1,4 'suites': [5 {6 'cases': [7 {8 'code': r"""9 >>> ps = ['short', 'really long', 'tiny']10 >>> s = lambda p: len(p) <= 511 >>> choose(ps, s, 0)12 'short'13 >>> choose(ps, s, 1)14 'tiny'15 >>> choose(ps, s, 2)16 ''17 """,18 'hidden': False,19 'locked': False20 }21 ],22 'scored': True,23 'setup': r"""24 >>> from cats import choose25 """,26 'teardown': '',27 'type': 'doctest'28 },29 {30 'cases': [31 {32 'code': r"""33 >>> ps = ['d', 'Njtv', 'Kxg', 'ym6bMNxUy', 'Lz']34 >>> s = lambda p: p == 'Kxg' or p == 'Lz' or p == 'd'35 >>> choose(ps, s, 0)36 'd'37 >>> choose(ps, s, 1)38 'Kxg'39 >>> choose(ps, s, 2)40 'Lz'41 >>> choose(ps, s, 3)42 ''43 >>> choose(ps, s, 4)44 ''45 >>> choose(ps, s, 5)46 ''47 >>> choose(ps, s, 6)48 ''49 """,50 'hidden': False,51 'locked': False52 },53 {54 'code': r"""55 >>> ps = ['jlfpaqbmh', 'zYuLsul', 'exx', 'X3EGwnPjh9', '5ba8riy']56 >>> s = lambda p: p == '5ba8riy' or p == 'exx' or p == 'jlfpaqbmh' or p == 'zYuLsul'57 >>> choose(ps, s, 0)58 'jlfpaqbmh'59 >>> choose(ps, s, 1)60 'zYuLsul'61 >>> choose(ps, s, 2)62 'exx'63 >>> choose(ps, s, 3)64 '5ba8riy'65 >>> choose(ps, s, 4)66 ''67 >>> choose(ps, s, 5)68 ''69 >>> choose(ps, s, 6)70 ''71 """,72 'hidden': False,73 'locked': False74 },75 {76 'code': r"""77 >>> ps = ['wRslOhIXF', 'VFAu80', 'NdMeQR', 'NMQH', 'fyeU', 'Ft5Fcq0', 'eAp', 'NU']78 >>> s = lambda p: p == 'Ft5Fcq0' or p == 'NdMeQR' or p == 'eAp' or p == 'fyeU'79 >>> choose(ps, s, 0)80 'NdMeQR'81 >>> choose(ps, s, 1)82 'fyeU'83 >>> choose(ps, s, 2)84 'Ft5Fcq0'85 >>> choose(ps, s, 3)86 'eAp'87 >>> choose(ps, s, 4)88 ''89 >>> choose(ps, s, 5)90 ''91 >>> choose(ps, s, 6)92 ''93 >>> choose(ps, s, 7)94 ''95 >>> choose(ps, s, 8)96 ''97 >>> choose(ps, s, 9)98 ''99 """,100 'hidden': False,101 'locked': False102 },103 {104 'code': r"""105 >>> ps = ['d4iav9tkR5', 'kv3MGuSDNo', 'ArAwcc8bZ', 'OUHDQy', '4RH7pWLu', 'vo', 'C32aa', 's0L44hL9UH']106 >>> s = lambda p: p == '4RH7pWLu' or p == 'ArAwcc8bZ' or p == 'C32aa' or p == 'OUHDQy' or p == 'd4iav9tkR5' or p == 'kv3MGuSDNo'107 >>> choose(ps, s, 0)108 'd4iav9tkR5'109 >>> choose(ps, s, 1)110 'kv3MGuSDNo'111 >>> choose(ps, s, 2)112 'ArAwcc8bZ'113 >>> choose(ps, s, 3)114 'OUHDQy'115 >>> choose(ps, s, 4)116 '4RH7pWLu'117 >>> choose(ps, s, 5)118 'C32aa'119 >>> choose(ps, s, 6)120 ''121 >>> choose(ps, s, 7)122 ''123 >>> choose(ps, s, 8)124 ''125 >>> choose(ps, s, 9)126 ''127 """,128 'hidden': False,129 'locked': False130 },131 {132 'code': r"""133 >>> ps = ['bOxiYj', 'TE335OKY', 'Q0da3vv', 'M9M4cU1EiX', '6xG', 'ZQTHGTCdY', 'pIF5']134 >>> s = lambda p: p == '6xG' or p == 'Q0da3vv' or p == 'ZQTHGTCdY' or p == 'bOxiYj' or p == 'pIF5'135 >>> choose(ps, s, 0)136 'bOxiYj'137 >>> choose(ps, s, 1)138 'Q0da3vv'139 >>> choose(ps, s, 2)140 '6xG'141 >>> choose(ps, s, 3)142 'ZQTHGTCdY'143 >>> choose(ps, s, 4)144 'pIF5'145 >>> choose(ps, s, 5)146 ''147 >>> choose(ps, s, 6)148 ''149 >>> choose(ps, s, 7)150 ''151 >>> choose(ps, s, 8)152 ''153 """,154 'hidden': False,155 'locked': False156 },157 {158 'code': r"""159 >>> ps = ['2qjiKNB', 'E', 'h']160 >>> s = lambda p: p == 'E' or p == 'h'161 >>> choose(ps, s, 0)162 'E'163 >>> choose(ps, s, 1)164 'h'165 >>> choose(ps, s, 2)166 ''167 >>> choose(ps, s, 3)168 ''169 >>> choose(ps, s, 4)170 ''171 """,172 'hidden': False,173 'locked': False174 },175 {176 'code': r"""177 >>> ps = ['uQTp', 'z', 'ln', 'AVHSUeHicm', 'BFcf9', 'wYRfLXeLqc', 'tv8', 'fYAo3OfgQA', 'vlbs']178 >>> s = lambda p: p == 'AVHSUeHicm' or p == 'BFcf9' or p == 'ln' or p == 'uQTp' or p == 'vlbs'179 >>> choose(ps, s, 0)180 'uQTp'181 >>> choose(ps, s, 1)182 'ln'183 >>> choose(ps, s, 2)184 'AVHSUeHicm'185 >>> choose(ps, s, 3)186 'BFcf9'187 >>> choose(ps, s, 4)188 'vlbs'189 >>> choose(ps, s, 5)190 ''191 >>> choose(ps, s, 6)192 ''193 >>> choose(ps, s, 7)194 ''195 >>> choose(ps, s, 8)196 ''197 >>> choose(ps, s, 9)198 ''199 >>> choose(ps, s, 10)200 ''201 """,202 'hidden': False,203 'locked': False204 },205 {206 'code': r"""207 >>> ps = ['2dtxNC5oxi', 'UQAiNMeWhS', 'l', '6gt8Sf4y']208 >>> s = lambda p: p == '2dtxNC5oxi' or p == '6gt8Sf4y' or p == 'UQAiNMeWhS'209 >>> choose(ps, s, 0)210 '2dtxNC5oxi'211 >>> choose(ps, s, 1)212 'UQAiNMeWhS'213 >>> choose(ps, s, 2)214 '6gt8Sf4y'215 >>> choose(ps, s, 3)216 ''217 >>> choose(ps, s, 4)218 ''219 >>> choose(ps, s, 5)220 ''221 """,222 'hidden': False,223 'locked': False224 },225 {226 'code': r"""227 >>> ps = ['XPfAi', 'OWTv', 'Zk']228 >>> s = lambda p: p == 'XPfAi' or p == 'Zk'229 >>> choose(ps, s, 0)230 'XPfAi'231 >>> choose(ps, s, 1)232 'Zk'233 >>> choose(ps, s, 2)234 ''235 >>> choose(ps, s, 3)236 ''237 >>> choose(ps, s, 4)238 ''239 """,240 'hidden': False,241 'locked': False242 },243 {244 'code': r"""245 >>> ps = ['47w9bw0', '6X41BHDCa', 'k4DQ84msw', 'b4JlLtM3j', '4']246 >>> s = lambda p: p == '4' or p == '47w9bw0' or p == '6X41BHDCa' or p == 'b4JlLtM3j'247 >>> choose(ps, s, 0)248 '47w9bw0'249 >>> choose(ps, s, 1)250 '6X41BHDCa'251 >>> choose(ps, s, 2)252 'b4JlLtM3j'253 >>> choose(ps, s, 3)254 '4'255 >>> choose(ps, s, 4)256 ''257 >>> choose(ps, s, 5)258 ''259 >>> choose(ps, s, 6)260 ''261 """,262 'hidden': False,263 'locked': False264 },265 {266 'code': r"""267 >>> ps = ['paX7C', 'DWDX6ijaQO', 'KZqKVl2', 'R6HiKoXZ2', 'nZznCw', 'mbF5KBsDnw', 'E4lCkyjp', 'q2h', 'lrUhlCHu6']268 >>> s = lambda p: p == 'R6HiKoXZ2' or p == 'mbF5KBsDnw'269 >>> choose(ps, s, 0)270 'R6HiKoXZ2'271 >>> choose(ps, s, 1)272 'mbF5KBsDnw'273 >>> choose(ps, s, 2)274 ''275 >>> choose(ps, s, 3)276 ''277 >>> choose(ps, s, 4)278 ''279 >>> choose(ps, s, 5)280 ''281 >>> choose(ps, s, 6)282 ''283 >>> choose(ps, s, 7)284 ''285 >>> choose(ps, s, 8)286 ''287 >>> choose(ps, s, 9)288 ''289 >>> choose(ps, s, 10)290 ''291 """,292 'hidden': False,293 'locked': False294 },295 {296 'code': r"""297 >>> ps = ['B', '3n', 'hs', 'TCW9GTS9e', 'mbk', '1NurBy', 'rdgRYYa9p', 'x', 'zRk5BS1']298 >>> s = lambda p: p == '3n' or p == 'TCW9GTS9e' or p == 'hs' or p == 'x'299 >>> choose(ps, s, 0)300 '3n'301 >>> choose(ps, s, 1)302 'hs'303 >>> choose(ps, s, 2)304 'TCW9GTS9e'305 >>> choose(ps, s, 3)306 'x'307 >>> choose(ps, s, 4)308 ''309 >>> choose(ps, s, 5)310 ''311 >>> choose(ps, s, 6)312 ''313 >>> choose(ps, s, 7)314 ''315 >>> choose(ps, s, 8)316 ''317 >>> choose(ps, s, 9)318 ''319 >>> choose(ps, s, 10)320 ''321 """,322 'hidden': False,323 'locked': False324 },325 {326 'code': r"""327 >>> ps = ['cd', 'mWwX', 'fnzIl', 'ka1Omns', 'JKJHE3GswY', 'u']328 >>> s = lambda p: p == 'JKJHE3GswY' or p == 'fnzIl' or p == 'ka1Omns' or p == 'mWwX'329 >>> choose(ps, s, 0)330 'mWwX'331 >>> choose(ps, s, 1)332 'fnzIl'333 >>> choose(ps, s, 2)334 'ka1Omns'335 >>> choose(ps, s, 3)336 'JKJHE3GswY'337 >>> choose(ps, s, 4)338 ''339 >>> choose(ps, s, 5)340 ''341 >>> choose(ps, s, 6)342 ''343 >>> choose(ps, s, 7)344 ''345 """,346 'hidden': False,347 'locked': False348 },349 {350 'code': r"""351 >>> ps = ['k', 'M']352 >>> s = lambda p: False353 >>> choose(ps, s, 0)354 ''355 >>> choose(ps, s, 1)356 ''357 >>> choose(ps, s, 2)358 ''359 >>> choose(ps, s, 3)360 ''361 """,362 'hidden': False,363 'locked': False364 },365 {366 'code': r"""367 >>> ps = ['h5MQCkq', 'TAzx2RG3e', 'w', 'fL4LP', 'NdpenT74r', 'aFj7B1A', 'Yb8hOkT', 'b5ln']368 >>> s = lambda p: p == 'NdpenT74r' or p == 'TAzx2RG3e' or p == 'Yb8hOkT' or p == 'aFj7B1A' or p == 'b5ln' or p == 'h5MQCkq' or p == 'w'369 >>> choose(ps, s, 0)370 'h5MQCkq'371 >>> choose(ps, s, 1)372 'TAzx2RG3e'373 >>> choose(ps, s, 2)374 'w'375 >>> choose(ps, s, 3)376 'NdpenT74r'377 >>> choose(ps, s, 4)378 'aFj7B1A'379 >>> choose(ps, s, 5)380 'Yb8hOkT'381 >>> choose(ps, s, 6)382 'b5ln'383 >>> choose(ps, s, 7)384 ''385 >>> choose(ps, s, 8)386 ''387 >>> choose(ps, s, 9)388 ''389 """,390 'hidden': False,391 'locked': False392 },393 {394 'code': r"""395 >>> ps = ['mf3aCB', 'lv2VDrTF', 'GkpePNLt', 'p4YXbFG', 'AIlYbO', 'gPIOwO', 'CJehcQGLh', 'yL8T']396 >>> s = lambda p: p == 'AIlYbO' or p == 'CJehcQGLh' or p == 'gPIOwO' or p == 'lv2VDrTF' or p == 'mf3aCB'397 >>> choose(ps, s, 0)398 'mf3aCB'399 >>> choose(ps, s, 1)400 'lv2VDrTF'401 >>> choose(ps, s, 2)402 'AIlYbO'403 >>> choose(ps, s, 3)404 'gPIOwO'405 >>> choose(ps, s, 4)406 'CJehcQGLh'407 >>> choose(ps, s, 5)408 ''409 >>> choose(ps, s, 6)410 ''411 >>> choose(ps, s, 7)412 ''413 >>> choose(ps, s, 8)414 ''415 >>> choose(ps, s, 9)416 ''417 """,418 'hidden': False,419 'locked': False420 },421 {422 'code': r"""423 >>> ps = ['fb7e9FePGq', '6Us0GbFkI', 'oDnaL', '7SZ', 'ILPKrO0So', 'F27VNv', 'Sq2ivsu5S', 'byR', 'PbU7Rgrm']424 >>> s = lambda p: p == '6Us0GbFkI' or p == 'F27VNv' or p == 'PbU7Rgrm' or p == 'Sq2ivsu5S' or p == 'fb7e9FePGq'425 >>> choose(ps, s, 0)426 'fb7e9FePGq'427 >>> choose(ps, s, 1)428 '6Us0GbFkI'429 >>> choose(ps, s, 2)430 'F27VNv'431 >>> choose(ps, s, 3)432 'Sq2ivsu5S'433 >>> choose(ps, s, 4)434 'PbU7Rgrm'435 >>> choose(ps, s, 5)436 ''437 >>> choose(ps, s, 6)438 ''439 >>> choose(ps, s, 7)440 ''441 >>> choose(ps, s, 8)442 ''443 >>> choose(ps, s, 9)444 ''445 >>> choose(ps, s, 10)446 ''447 """,448 'hidden': False,449 'locked': False450 },451 {452 'code': r"""453 >>> ps = ['w5WTwFe']454 >>> s = lambda p: p == 'w5WTwFe'455 >>> choose(ps, s, 0)456 'w5WTwFe'457 >>> choose(ps, s, 1)458 ''459 >>> choose(ps, s, 2)460 ''461 """,462 'hidden': False,463 'locked': False464 },465 {466 'code': r"""467 >>> ps = ['fXUYciyIr', 'vVQk01', 'KeRbdjfo']468 >>> s = lambda p: p == 'vVQk01'469 >>> choose(ps, s, 0)470 'vVQk01'471 >>> choose(ps, s, 1)472 ''473 >>> choose(ps, s, 2)474 ''475 >>> choose(ps, s, 3)476 ''477 >>> choose(ps, s, 4)478 ''479 """,480 'hidden': False,481 'locked': False482 },483 {484 'code': r"""485 >>> ps = ['Ot0', '4wI', 'HkwYSN', 'qNhjljev', 'NCrXc1']486 >>> s = lambda p: p == '4wI' or p == 'HkwYSN' or p == 'Ot0'487 >>> choose(ps, s, 0)488 'Ot0'489 >>> choose(ps, s, 1)490 '4wI'491 >>> choose(ps, s, 2)492 'HkwYSN'493 >>> choose(ps, s, 3)494 ''495 >>> choose(ps, s, 4)496 ''497 >>> choose(ps, s, 5)498 ''499 >>> choose(ps, s, 6)500 ''501 """,502 'hidden': False,503 'locked': False504 },505 {506 'code': r"""507 >>> ps = ['ulwhIG2OvA', 'q9MM', 'P']508 >>> s = lambda p: p == 'P' or p == 'q9MM' or p == 'ulwhIG2OvA'509 >>> choose(ps, s, 0)510 'ulwhIG2OvA'511 >>> choose(ps, s, 1)512 'q9MM'513 >>> choose(ps, s, 2)514 'P'515 >>> choose(ps, s, 3)516 ''517 >>> choose(ps, s, 4)518 ''519 """,520 'hidden': False,521 'locked': False522 },523 {524 'code': r"""525 >>> ps = ['eWW4J8IXk', 'US99P926W', 'Mu7u3', 'PfMLsgY4S', 'W1f', '6', 'W4BH', 's', 'uACjqTa']526 >>> s = lambda p: p == '6' or p == 'Mu7u3' or p == 'PfMLsgY4S' or p == 'US99P926W' or p == 'eWW4J8IXk'527 >>> choose(ps, s, 0)528 'eWW4J8IXk'529 >>> choose(ps, s, 1)530 'US99P926W'531 >>> choose(ps, s, 2)532 'Mu7u3'533 >>> choose(ps, s, 3)534 'PfMLsgY4S'535 >>> choose(ps, s, 4)536 '6'537 >>> choose(ps, s, 5)538 ''539 >>> choose(ps, s, 6)540 ''541 >>> choose(ps, s, 7)542 ''543 >>> choose(ps, s, 8)544 ''545 >>> choose(ps, s, 9)546 ''547 >>> choose(ps, s, 10)548 ''549 """,550 'hidden': False,551 'locked': False552 },553 {554 'code': r"""555 >>> ps = ['SaKM2', 'iFKDs', '6DNIPiOfV', 'IDsrM', 'ttcBhBNxUQ']556 >>> s = lambda p: p == '6DNIPiOfV' or p == 'SaKM2' or p == 'iFKDs' or p == 'ttcBhBNxUQ'557 >>> choose(ps, s, 0)558 'SaKM2'559 >>> choose(ps, s, 1)560 'iFKDs'561 >>> choose(ps, s, 2)562 '6DNIPiOfV'563 >>> choose(ps, s, 3)564 'ttcBhBNxUQ'565 >>> choose(ps, s, 4)566 ''567 >>> choose(ps, s, 5)568 ''569 >>> choose(ps, s, 6)570 ''571 """,572 'hidden': False,573 'locked': False574 },575 {576 'code': r"""577 >>> ps = ['Oj2OFTm', 'AzZg7TmX', 'lvf']578 >>> s = lambda p: p == 'lvf'579 >>> choose(ps, s, 0)580 'lvf'581 >>> choose(ps, s, 1)582 ''583 >>> choose(ps, s, 2)584 ''585 >>> choose(ps, s, 3)586 ''587 >>> choose(ps, s, 4)588 ''589 """,590 'hidden': False,591 'locked': False592 },593 {594 'code': r"""595 >>> ps = ['axrr', 'K7']596 >>> s = lambda p: p == 'axrr'597 >>> choose(ps, s, 0)598 'axrr'599 >>> choose(ps, s, 1)600 ''601 >>> choose(ps, s, 2)602 ''603 >>> choose(ps, s, 3)604 ''605 """,606 'hidden': False,607 'locked': False608 },609 {610 'code': r"""611 >>> ps = ['xSY9iCe', '9F0fbNdy3d', 'TdbwF', 'V']612 >>> s = lambda p: p == 'V' or p == 'xSY9iCe'613 >>> choose(ps, s, 0)614 'xSY9iCe'615 >>> choose(ps, s, 1)616 'V'617 >>> choose(ps, s, 2)618 ''619 >>> choose(ps, s, 3)620 ''621 >>> choose(ps, s, 4)622 ''623 >>> choose(ps, s, 5)624 ''625 """,626 'hidden': False,627 'locked': False628 },629 {630 'code': r"""631 >>> ps = ['WbMtnAG', 'ITr3Z', 'z0UyvE', 'MVB4sV1m', '6']632 >>> s = lambda p: p == '6'633 >>> choose(ps, s, 0)634 '6'635 >>> choose(ps, s, 1)636 ''637 >>> choose(ps, s, 2)638 ''639 >>> choose(ps, s, 3)640 ''641 >>> choose(ps, s, 4)642 ''643 >>> choose(ps, s, 5)644 ''645 >>> choose(ps, s, 6)646 ''647 """,648 'hidden': False,649 'locked': False650 },651 {652 'code': r"""653 >>> ps = ['iF4WLyznX', 'QHU', 'e2']654 >>> s = lambda p: p == 'QHU' or p == 'e2' or p == 'iF4WLyznX'655 >>> choose(ps, s, 0)656 'iF4WLyznX'657 >>> choose(ps, s, 1)658 'QHU'659 >>> choose(ps, s, 2)660 'e2'661 >>> choose(ps, s, 3)662 ''663 >>> choose(ps, s, 4)664 ''665 """,666 'hidden': False,667 'locked': False668 },669 {670 'code': r"""671 >>> ps = ['fw0GdxmaZx']672 >>> s = lambda p: False673 >>> choose(ps, s, 0)674 ''675 >>> choose(ps, s, 1)676 ''677 >>> choose(ps, s, 2)678 ''679 """,680 'hidden': False,681 'locked': False682 },683 {684 'code': r"""685 >>> ps = ['S9IO', 'P', 'yv', 'HEE4', 'lB']686 >>> s = lambda p: p == 'HEE4' or p == 'S9IO'687 >>> choose(ps, s, 0)688 'S9IO'689 >>> choose(ps, s, 1)690 'HEE4'691 >>> choose(ps, s, 2)692 ''693 >>> choose(ps, s, 3)694 ''695 >>> choose(ps, s, 4)696 ''697 >>> choose(ps, s, 5)698 ''699 >>> choose(ps, s, 6)700 ''701 """,702 'hidden': False,703 'locked': False704 },705 {706 'code': r"""707 >>> ps = ['TT0mxc', '7rUdPh', 'bXT9Jss0', 'MmqgB', 'l']708 >>> s = lambda p: p == '7rUdPh' or p == 'MmqgB' or p == 'TT0mxc'709 >>> choose(ps, s, 0)710 'TT0mxc'711 >>> choose(ps, s, 1)712 '7rUdPh'713 >>> choose(ps, s, 2)714 'MmqgB'715 >>> choose(ps, s, 3)716 ''717 >>> choose(ps, s, 4)718 ''719 >>> choose(ps, s, 5)720 ''721 >>> choose(ps, s, 6)722 ''723 """,724 'hidden': False,725 'locked': False726 },727 {728 'code': r"""729 >>> ps = ['qIx6C8DM', 'sszrxRC']730 >>> s = lambda p: p == 'qIx6C8DM'731 >>> choose(ps, s, 0)732 'qIx6C8DM'733 >>> choose(ps, s, 1)734 ''735 >>> choose(ps, s, 2)736 ''737 >>> choose(ps, s, 3)738 ''739 """,740 'hidden': False,741 'locked': False742 },743 {744 'code': r"""745 >>> ps = ['28yt8h', 'dLQjelrdbI', 'yQsk', 'YKK5f', 'Mnll4AD0DA', 'l', 'UEePEqt']746 >>> s = lambda p: p == 'Mnll4AD0DA' or p == 'UEePEqt' or p == 'YKK5f' or p == 'dLQjelrdbI'747 >>> choose(ps, s, 0)748 'dLQjelrdbI'749 >>> choose(ps, s, 1)750 'YKK5f'751 >>> choose(ps, s, 2)752 'Mnll4AD0DA'753 >>> choose(ps, s, 3)754 'UEePEqt'755 >>> choose(ps, s, 4)756 ''757 >>> choose(ps, s, 5)758 ''759 >>> choose(ps, s, 6)760 ''761 >>> choose(ps, s, 7)762 ''763 >>> choose(ps, s, 8)764 ''765 """,766 'hidden': False,767 'locked': False768 },769 {770 'code': r"""771 >>> ps = ['ycsj5dM9', 'o8QT', 'HnFS', 'mlwqqQM2']772 >>> s = lambda p: False773 >>> choose(ps, s, 0)774 ''775 >>> choose(ps, s, 1)776 ''777 >>> choose(ps, s, 2)778 ''779 >>> choose(ps, s, 3)780 ''781 >>> choose(ps, s, 4)782 ''783 >>> choose(ps, s, 5)784 ''785 """,786 'hidden': False,787 'locked': False788 },789 {790 'code': r"""791 >>> ps = ['2veJflQoDs']792 >>> s = lambda p: p == '2veJflQoDs'793 >>> choose(ps, s, 0)794 '2veJflQoDs'795 >>> choose(ps, s, 1)796 ''797 >>> choose(ps, s, 2)798 ''799 """,800 'hidden': False,801 'locked': False802 },803 {804 'code': r"""805 >>> ps = ['HSa5Oll4', '53ESB34aP', 'Vvd', 'tjT7', 'Nf4gq9E8S', '5k', 'EGQIsv4dqA', 'HdD26', 'VstrT']806 >>> s = lambda p: p == '53ESB34aP' or p == '5k' or p == 'HdD26'807 >>> choose(ps, s, 0)808 '53ESB34aP'809 >>> choose(ps, s, 1)810 '5k'811 >>> choose(ps, s, 2)812 'HdD26'813 >>> choose(ps, s, 3)814 ''815 >>> choose(ps, s, 4)816 ''817 >>> choose(ps, s, 5)818 ''819 >>> choose(ps, s, 6)820 ''821 >>> choose(ps, s, 7)822 ''823 >>> choose(ps, s, 8)824 ''825 >>> choose(ps, s, 9)826 ''827 >>> choose(ps, s, 10)828 ''829 """,830 'hidden': False,831 'locked': False832 },833 {834 'code': r"""835 >>> ps = ['EOH', 'L3gKaBFggw', 'Pw', '8KotZ', 'ETvnL8wUFz']836 >>> s = lambda p: p == '8KotZ' or p == 'ETvnL8wUFz' or p == 'L3gKaBFggw'837 >>> choose(ps, s, 0)838 'L3gKaBFggw'839 >>> choose(ps, s, 1)840 '8KotZ'841 >>> choose(ps, s, 2)842 'ETvnL8wUFz'843 >>> choose(ps, s, 3)844 ''845 >>> choose(ps, s, 4)846 ''847 >>> choose(ps, s, 5)848 ''849 >>> choose(ps, s, 6)850 ''851 """,852 'hidden': False,853 'locked': False854 },855 {856 'code': r"""857 >>> ps = ['6JdQvy1', 'FiOdYmyU', 'yA', 'y0Xk', 'cZCJ']858 >>> s = lambda p: p == 'FiOdYmyU' or p == 'cZCJ' or p == 'yA'859 >>> choose(ps, s, 0)860 'FiOdYmyU'861 >>> choose(ps, s, 1)862 'yA'863 >>> choose(ps, s, 2)864 'cZCJ'865 >>> choose(ps, s, 3)866 ''867 >>> choose(ps, s, 4)868 ''869 >>> choose(ps, s, 5)870 ''871 >>> choose(ps, s, 6)872 ''873 """,874 'hidden': False,875 'locked': False876 },877 {878 'code': r"""879 >>> ps = ['t8ecHx']880 >>> s = lambda p: p == 't8ecHx'881 >>> choose(ps, s, 0)882 't8ecHx'883 >>> choose(ps, s, 1)884 ''885 >>> choose(ps, s, 2)886 ''887 """,888 'hidden': False,889 'locked': False890 },891 {892 'code': r"""893 >>> ps = ['PaugJ7We7l', 'EruzGoKuu', 'gfSxiiinxX', 'xT2EnjKnF4', '4dHOOOn', 'mPOFazJth', 'H2qc', 'bcHVrkfbu0', 'QV']894 >>> s = lambda p: p == 'H2qc' or p == 'bcHVrkfbu0' or p == 'mPOFazJth'895 >>> choose(ps, s, 0)896 'mPOFazJth'897 >>> choose(ps, s, 1)898 'H2qc'899 >>> choose(ps, s, 2)900 'bcHVrkfbu0'901 >>> choose(ps, s, 3)902 ''903 >>> choose(ps, s, 4)904 ''905 >>> choose(ps, s, 5)906 ''907 >>> choose(ps, s, 6)908 ''909 >>> choose(ps, s, 7)910 ''911 >>> choose(ps, s, 8)912 ''913 >>> choose(ps, s, 9)914 ''915 >>> choose(ps, s, 10)916 ''917 """,918 'hidden': False,919 'locked': False920 },921 {922 'code': r"""923 >>> ps = ['L44YbmhY', 'Fk3t', 'GX1ji0EpoC', 'O6kwd', 'h3Xt', 'sYp6dE']924 >>> s = lambda p: p == 'O6kwd' or p == 'h3Xt' or p == 'sYp6dE'925 >>> choose(ps, s, 0)926 'O6kwd'927 >>> choose(ps, s, 1)928 'h3Xt'929 >>> choose(ps, s, 2)930 'sYp6dE'931 >>> choose(ps, s, 3)932 ''933 >>> choose(ps, s, 4)934 ''935 >>> choose(ps, s, 5)936 ''937 >>> choose(ps, s, 6)938 ''939 >>> choose(ps, s, 7)940 ''941 """,942 'hidden': False,943 'locked': False944 },945 {946 'code': r"""947 >>> ps = []948 >>> s = lambda p: False949 >>> choose(ps, s, 0)950 ''951 >>> choose(ps, s, 1)952 ''953 """,954 'hidden': False,955 'locked': False956 },957 {958 'code': r"""959 >>> ps = ['CoQh', 'M5swk', '0JNxcv0b', 'RDLb7uGl', 'v8RyWA6PB7', 'R2Z']960 >>> s = lambda p: p == 'CoQh'961 >>> choose(ps, s, 0)962 'CoQh'963 >>> choose(ps, s, 1)964 ''965 >>> choose(ps, s, 2)966 ''967 >>> choose(ps, s, 3)968 ''969 >>> choose(ps, s, 4)970 ''971 >>> choose(ps, s, 5)972 ''973 >>> choose(ps, s, 6)974 ''975 >>> choose(ps, s, 7)976 ''977 """,978 'hidden': False,979 'locked': False980 },981 {982 'code': r"""983 >>> ps = ['X', '6qZr7B', 'UEx', 'J']984 >>> s = lambda p: p == 'J' or p == 'UEx' or p == 'X'985 >>> choose(ps, s, 0)986 'X'987 >>> choose(ps, s, 1)988 'UEx'989 >>> choose(ps, s, 2)990 'J'991 >>> choose(ps, s, 3)992 ''993 >>> choose(ps, s, 4)994 ''995 >>> choose(ps, s, 5)996 ''997 """,998 'hidden': False,999 'locked': False1000 },1001 {1002 'code': r"""1003 >>> ps = ['XT7d', 'u', 'VQ4x', 'wzdhdJMT']1004 >>> s = lambda p: p == 'VQ4x' or p == 'XT7d' or p == 'wzdhdJMT'1005 >>> choose(ps, s, 0)1006 'XT7d'1007 >>> choose(ps, s, 1)1008 'VQ4x'1009 >>> choose(ps, s, 2)1010 'wzdhdJMT'1011 >>> choose(ps, s, 3)1012 ''1013 >>> choose(ps, s, 4)1014 ''1015 >>> choose(ps, s, 5)1016 ''1017 """,1018 'hidden': False,1019 'locked': False1020 },1021 {1022 'code': r"""1023 >>> ps = ['F', 'Je54pb', '52ixUi']1024 >>> s = lambda p: p == 'F'1025 >>> choose(ps, s, 0)1026 'F'1027 >>> choose(ps, s, 1)1028 ''1029 >>> choose(ps, s, 2)1030 ''1031 >>> choose(ps, s, 3)1032 ''1033 >>> choose(ps, s, 4)1034 ''1035 """,1036 'hidden': False,1037 'locked': False1038 },1039 {1040 'code': r"""1041 >>> ps = ['06tslD8Bq', 'iGF', 'wI7pEIcY', 'xi428Wc', 'OimbC']1042 >>> s = lambda p: p == '06tslD8Bq' or p == 'OimbC'1043 >>> choose(ps, s, 0)1044 '06tslD8Bq'1045 >>> choose(ps, s, 1)1046 'OimbC'1047 >>> choose(ps, s, 2)1048 ''1049 >>> choose(ps, s, 3)1050 ''1051 >>> choose(ps, s, 4)1052 ''1053 >>> choose(ps, s, 5)1054 ''1055 >>> choose(ps, s, 6)1056 ''1057 """,1058 'hidden': False,1059 'locked': False1060 },1061 {1062 'code': r"""1063 >>> ps = ['hiiZqx7', 'h', 'TX3YAYRb', '70iPYPb1', 'j', 'acU', 'eJ']1064 >>> s = lambda p: p == '70iPYPb1' or p == 'TX3YAYRb' or p == 'eJ' or p == 'h'1065 >>> choose(ps, s, 0)1066 'h'1067 >>> choose(ps, s, 1)1068 'TX3YAYRb'1069 >>> choose(ps, s, 2)1070 '70iPYPb1'1071 >>> choose(ps, s, 3)1072 'eJ'1073 >>> choose(ps, s, 4)1074 ''1075 >>> choose(ps, s, 5)1076 ''1077 >>> choose(ps, s, 6)1078 ''1079 >>> choose(ps, s, 7)1080 ''1081 >>> choose(ps, s, 8)1082 ''1083 """,1084 'hidden': False,1085 'locked': False1086 },1087 {1088 'code': r"""1089 >>> ps = []1090 >>> s = lambda p: False1091 >>> choose(ps, s, 0)1092 ''1093 >>> choose(ps, s, 1)1094 ''1095 """,1096 'hidden': False,1097 'locked': False1098 },1099 {1100 'code': r"""1101 >>> ps = ['20Ymff', 'sK', 's', 'Ag7H', 'KpCpiJO', '7eme86FfN4', 'ng', 'TL0Ek']1102 >>> s = lambda p: p == '20Ymff' or p == 'Ag7H' or p == 'TL0Ek' or p == 's'1103 >>> choose(ps, s, 0)1104 '20Ymff'1105 >>> choose(ps, s, 1)1106 's'1107 >>> choose(ps, s, 2)1108 'Ag7H'1109 >>> choose(ps, s, 3)1110 'TL0Ek'1111 >>> choose(ps, s, 4)1112 ''1113 >>> choose(ps, s, 5)1114 ''1115 >>> choose(ps, s, 6)1116 ''1117 >>> choose(ps, s, 7)1118 ''1119 >>> choose(ps, s, 8)1120 ''1121 >>> choose(ps, s, 9)1122 ''1123 """,1124 'hidden': False,1125 'locked': False1126 },1127 {1128 'code': r"""1129 >>> ps = []1130 >>> s = lambda p: False1131 >>> choose(ps, s, 0)1132 ''1133 >>> choose(ps, s, 1)1134 ''1135 """,1136 'hidden': False,1137 'locked': False1138 },1139 {1140 'code': r"""1141 >>> ps = ['GjfqvE', 'PL6UL', 'KJBMC', 'kgzHn', 'NWyO2', 'Cf5sl', '8Exh', 'B94I', 'E3rd1T']1142 >>> s = lambda p: p == '8Exh' or p == 'B94I' or p == 'Cf5sl' or p == 'NWyO2' or p == 'PL6UL' or p == 'kgzHn'1143 >>> choose(ps, s, 0)1144 'PL6UL'1145 >>> choose(ps, s, 1)1146 'kgzHn'1147 >>> choose(ps, s, 2)1148 'NWyO2'1149 >>> choose(ps, s, 3)1150 'Cf5sl'1151 >>> choose(ps, s, 4)1152 '8Exh'1153 >>> choose(ps, s, 5)1154 'B94I'1155 >>> choose(ps, s, 6)1156 ''1157 >>> choose(ps, s, 7)1158 ''1159 >>> choose(ps, s, 8)1160 ''1161 >>> choose(ps, s, 9)1162 ''1163 >>> choose(ps, s, 10)1164 ''1165 """,1166 'hidden': False,1167 'locked': False1168 },1169 {1170 'code': r"""1171 >>> ps = ['wC3GfQlB', 'JHJH', 'XqlW2U', 'mN5KwhN', 'uI1Rouka']1172 >>> s = lambda p: p == 'JHJH' or p == 'XqlW2U' or p == 'uI1Rouka' or p == 'wC3GfQlB'1173 >>> choose(ps, s, 0)1174 'wC3GfQlB'1175 >>> choose(ps, s, 1)1176 'JHJH'1177 >>> choose(ps, s, 2)1178 'XqlW2U'1179 >>> choose(ps, s, 3)1180 'uI1Rouka'1181 >>> choose(ps, s, 4)1182 ''1183 >>> choose(ps, s, 5)1184 ''1185 >>> choose(ps, s, 6)1186 ''1187 """,1188 'hidden': False,1189 'locked': False1190 },1191 {1192 'code': r"""1193 >>> ps = ['L79w0W', '6mj6fs6zl', 'JMAx5', 'TAxJlgomqw', 'VqC', 'v77m', 'L', 'fGNj28', 'n0FiOnb']1194 >>> s = lambda p: p == 'JMAx5' or p == 'L79w0W' or p == 'TAxJlgomqw'1195 >>> choose(ps, s, 0)1196 'L79w0W'1197 >>> choose(ps, s, 1)1198 'JMAx5'1199 >>> choose(ps, s, 2)1200 'TAxJlgomqw'1201 >>> choose(ps, s, 3)1202 ''1203 >>> choose(ps, s, 4)1204 ''1205 >>> choose(ps, s, 5)1206 ''1207 >>> choose(ps, s, 6)1208 ''1209 >>> choose(ps, s, 7)1210 ''1211 >>> choose(ps, s, 8)1212 ''1213 >>> choose(ps, s, 9)1214 ''1215 >>> choose(ps, s, 10)1216 ''1217 """,1218 'hidden': False,1219 'locked': False1220 },1221 {1222 'code': r"""1223 >>> ps = ['pxH', '4', 'rjgP3e00', 'uqM4zxd', 'bs2']1224 >>> s = lambda p: p == '4' or p == 'rjgP3e00'1225 >>> choose(ps, s, 0)1226 '4'1227 >>> choose(ps, s, 1)1228 'rjgP3e00'1229 >>> choose(ps, s, 2)1230 ''1231 >>> choose(ps, s, 3)1232 ''1233 >>> choose(ps, s, 4)1234 ''1235 >>> choose(ps, s, 5)1236 ''1237 >>> choose(ps, s, 6)1238 ''1239 """,1240 'hidden': False,1241 'locked': False1242 },1243 {1244 'code': r"""1245 >>> ps = ['9D9L3LBH2', 'J', 'VhFH13iZk', 'DBa3RTBs', 'yW', 'k877CPSy0', 'n0P69H']1246 >>> s = lambda p: p == '9D9L3LBH2' or p == 'k877CPSy0' or p == 'n0P69H' or p == 'yW'1247 >>> choose(ps, s, 0)1248 '9D9L3LBH2'1249 >>> choose(ps, s, 1)1250 'yW'1251 >>> choose(ps, s, 2)1252 'k877CPSy0'1253 >>> choose(ps, s, 3)1254 'n0P69H'1255 >>> choose(ps, s, 4)1256 ''1257 >>> choose(ps, s, 5)1258 ''1259 >>> choose(ps, s, 6)1260 ''1261 >>> choose(ps, s, 7)1262 ''1263 >>> choose(ps, s, 8)1264 ''1265 """,1266 'hidden': False,1267 'locked': False1268 },1269 {1270 'code': r"""1271 >>> ps = ['paIR6', '7xwK5A3VXy', 'RlU', '1', 'HzkFCL1']1272 >>> s = lambda p: p == '1' or p == '7xwK5A3VXy' or p == 'HzkFCL1'1273 >>> choose(ps, s, 0)1274 '7xwK5A3VXy'1275 >>> choose(ps, s, 1)1276 '1'1277 >>> choose(ps, s, 2)1278 'HzkFCL1'1279 >>> choose(ps, s, 3)1280 ''1281 >>> choose(ps, s, 4)1282 ''1283 >>> choose(ps, s, 5)1284 ''1285 >>> choose(ps, s, 6)1286 ''1287 """,1288 'hidden': False,1289 'locked': False1290 },1291 {1292 'code': r"""1293 >>> ps = ['wp4I4O', '35', 'ilyr69', 'IW', 'ge', 'z2YoOA']1294 >>> s = lambda p: p == '35' or p == 'ge'1295 >>> choose(ps, s, 0)1296 '35'1297 >>> choose(ps, s, 1)1298 'ge'1299 >>> choose(ps, s, 2)1300 ''1301 >>> choose(ps, s, 3)1302 ''1303 >>> choose(ps, s, 4)1304 ''1305 >>> choose(ps, s, 5)1306 ''1307 >>> choose(ps, s, 6)1308 ''1309 >>> choose(ps, s, 7)1310 ''1311 """,1312 'hidden': False,1313 'locked': False1314 },1315 {1316 'code': r"""1317 >>> ps = ['x', 'ovJ0zHALaM', 'uQ8ca']1318 >>> s = lambda p: p == 'uQ8ca' or p == 'x'1319 >>> choose(ps, s, 0)1320 'x'1321 >>> choose(ps, s, 1)1322 'uQ8ca'1323 >>> choose(ps, s, 2)1324 ''1325 >>> choose(ps, s, 3)1326 ''1327 >>> choose(ps, s, 4)1328 ''1329 """,1330 'hidden': False,1331 'locked': False1332 },1333 {1334 'code': r"""1335 >>> ps = ['Rp15aFda']1336 >>> s = lambda p: p == 'Rp15aFda'1337 >>> choose(ps, s, 0)1338 'Rp15aFda'1339 >>> choose(ps, s, 1)1340 ''1341 >>> choose(ps, s, 2)1342 ''1343 """,1344 'hidden': False,1345 'locked': False1346 },1347 {1348 'code': r"""1349 >>> ps = ['kpJi5rI']1350 >>> s = lambda p: p == 'kpJi5rI'1351 >>> choose(ps, s, 0)1352 'kpJi5rI'1353 >>> choose(ps, s, 1)1354 ''1355 >>> choose(ps, s, 2)1356 ''1357 """,1358 'hidden': False,1359 'locked': False1360 },1361 {1362 'code': r"""1363 >>> ps = ['IqV', '7Qb', 'fTVSZxW5']1364 >>> s = lambda p: p == '7Qb' or p == 'fTVSZxW5'1365 >>> choose(ps, s, 0)1366 '7Qb'1367 >>> choose(ps, s, 1)1368 'fTVSZxW5'1369 >>> choose(ps, s, 2)1370 ''1371 >>> choose(ps, s, 3)1372 ''1373 >>> choose(ps, s, 4)1374 ''1375 """,1376 'hidden': False,1377 'locked': False1378 },1379 {1380 'code': r"""1381 >>> ps = ['rjZl61rKE', 'HDjOZ1']1382 >>> s = lambda p: p == 'rjZl61rKE'1383 >>> choose(ps, s, 0)1384 'rjZl61rKE'1385 >>> choose(ps, s, 1)1386 ''1387 >>> choose(ps, s, 2)1388 ''1389 >>> choose(ps, s, 3)1390 ''1391 """,1392 'hidden': False,1393 'locked': False1394 },1395 {1396 'code': r"""1397 >>> ps = ['sGraoBYg', 'oLA4', 'yvOQGzZ', 'hLPo8k0gen']1398 >>> s = lambda p: p == 'hLPo8k0gen' or p == 'yvOQGzZ'1399 >>> choose(ps, s, 0)1400 'yvOQGzZ'1401 >>> choose(ps, s, 1)1402 'hLPo8k0gen'1403 >>> choose(ps, s, 2)1404 ''1405 >>> choose(ps, s, 3)1406 ''1407 >>> choose(ps, s, 4)1408 ''1409 >>> choose(ps, s, 5)1410 ''1411 """,1412 'hidden': False,1413 'locked': False1414 },1415 {1416 'code': r"""1417 >>> ps = ['3M2X0Zv', 'F', 'k2DiIqXEK', 'gu9']1418 >>> s = lambda p: p == '3M2X0Zv' or p == 'F' or p == 'k2DiIqXEK'1419 >>> choose(ps, s, 0)1420 '3M2X0Zv'1421 >>> choose(ps, s, 1)1422 'F'1423 >>> choose(ps, s, 2)1424 'k2DiIqXEK'1425 >>> choose(ps, s, 3)1426 ''1427 >>> choose(ps, s, 4)1428 ''1429 >>> choose(ps, s, 5)1430 ''1431 """,1432 'hidden': False,1433 'locked': False1434 },1435 {1436 'code': r"""1437 >>> ps = ['vh4DgMbOL', 'p4', 'XASk3gAAVQ', 'tielaIdpE', 'Dw']1438 >>> s = lambda p: p == 'Dw' or p == 'vh4DgMbOL'1439 >>> choose(ps, s, 0)1440 'vh4DgMbOL'1441 >>> choose(ps, s, 1)1442 'Dw'1443 >>> choose(ps, s, 2)1444 ''1445 >>> choose(ps, s, 3)1446 ''1447 >>> choose(ps, s, 4)1448 ''1449 >>> choose(ps, s, 5)1450 ''1451 >>> choose(ps, s, 6)1452 ''1453 """,1454 'hidden': False,1455 'locked': False1456 },1457 {1458 'code': r"""1459 >>> ps = ['Z6npAvZk', 'N', 'VFAkGss', 'gG7']1460 >>> s = lambda p: False1461 >>> choose(ps, s, 0)1462 ''1463 >>> choose(ps, s, 1)1464 ''1465 >>> choose(ps, s, 2)1466 ''1467 >>> choose(ps, s, 3)1468 ''1469 >>> choose(ps, s, 4)1470 ''1471 >>> choose(ps, s, 5)1472 ''1473 """,1474 'hidden': False,1475 'locked': False1476 },1477 {1478 'code': r"""1479 >>> ps = ['kfhzjB', 'wzTJ', 'O1JE2KF3']1480 >>> s = lambda p: p == 'O1JE2KF3' or p == 'wzTJ'1481 >>> choose(ps, s, 0)1482 'wzTJ'1483 >>> choose(ps, s, 1)1484 'O1JE2KF3'1485 >>> choose(ps, s, 2)1486 ''1487 >>> choose(ps, s, 3)1488 ''1489 >>> choose(ps, s, 4)1490 ''1491 """,1492 'hidden': False,1493 'locked': False1494 },1495 {1496 'code': r"""1497 >>> ps = ['KkSWCyxu', 'mStVtBi']1498 >>> s = lambda p: p == 'KkSWCyxu' or p == 'mStVtBi'1499 >>> choose(ps, s, 0)1500 'KkSWCyxu'1501 >>> choose(ps, s, 1)1502 'mStVtBi'1503 >>> choose(ps, s, 2)1504 ''1505 >>> choose(ps, s, 3)1506 ''1507 """,1508 'hidden': False,1509 'locked': False1510 },1511 {1512 'code': r"""1513 >>> ps = ['RA3uXwj4HM', 'y', 'Q0l1dq', 'ycJNy4V5', 'JRwovXgf', 'WTqDQ7Qt']1514 >>> s = lambda p: p == 'JRwovXgf' or p == 'Q0l1dq' or p == 'RA3uXwj4HM'1515 >>> choose(ps, s, 0)1516 'RA3uXwj4HM'1517 >>> choose(ps, s, 1)1518 'Q0l1dq'1519 >>> choose(ps, s, 2)1520 'JRwovXgf'1521 >>> choose(ps, s, 3)1522 ''1523 >>> choose(ps, s, 4)1524 ''1525 >>> choose(ps, s, 5)1526 ''1527 >>> choose(ps, s, 6)1528 ''1529 >>> choose(ps, s, 7)1530 ''1531 """,1532 'hidden': False,1533 'locked': False1534 },1535 {1536 'code': r"""1537 >>> ps = ['y87', '0', 'vU1uNi', 'x', 'HuY2b', 'p']1538 >>> s = lambda p: p == '0' or p == 'p' or p == 'vU1uNi'1539 >>> choose(ps, s, 0)1540 '0'1541 >>> choose(ps, s, 1)1542 'vU1uNi'1543 >>> choose(ps, s, 2)1544 'p'1545 >>> choose(ps, s, 3)1546 ''1547 >>> choose(ps, s, 4)1548 ''1549 >>> choose(ps, s, 5)1550 ''1551 >>> choose(ps, s, 6)1552 ''1553 >>> choose(ps, s, 7)1554 ''1555 """,1556 'hidden': False,1557 'locked': False1558 },1559 {1560 'code': r"""1561 >>> ps = ['OsFHq6MHE', 'jaiB', 'O', 'Wm', 'UWsHRw', '7wQ', 'cSX22kpZ']1562 >>> s = lambda p: p == '7wQ' or p == 'O' or p == 'UWsHRw'1563 >>> choose(ps, s, 0)1564 'O'1565 >>> choose(ps, s, 1)1566 'UWsHRw'1567 >>> choose(ps, s, 2)1568 '7wQ'1569 >>> choose(ps, s, 3)1570 ''1571 >>> choose(ps, s, 4)1572 ''1573 >>> choose(ps, s, 5)1574 ''1575 >>> choose(ps, s, 6)1576 ''1577 >>> choose(ps, s, 7)1578 ''1579 >>> choose(ps, s, 8)1580 ''1581 """,1582 'hidden': False,1583 'locked': False1584 },1585 {1586 'code': r"""1587 >>> ps = ['UkLE', 'pAVhDv', 'qiC1bA8ah', 'S', 'O90', 'd5p', 'F2', 'LE']1588 >>> s = lambda p: p == 'LE' or p == 'O90' or p == 'S' or p == 'UkLE' or p == 'd5p'1589 >>> choose(ps, s, 0)1590 'UkLE'1591 >>> choose(ps, s, 1)1592 'S'1593 >>> choose(ps, s, 2)1594 'O90'1595 >>> choose(ps, s, 3)1596 'd5p'1597 >>> choose(ps, s, 4)1598 'LE'1599 >>> choose(ps, s, 5)1600 ''1601 >>> choose(ps, s, 6)1602 ''1603 >>> choose(ps, s, 7)1604 ''1605 >>> choose(ps, s, 8)1606 ''1607 >>> choose(ps, s, 9)1608 ''1609 """,1610 'hidden': False,1611 'locked': False1612 },1613 {1614 'code': r"""1615 >>> ps = ['Ukq', 'dbMQhHK1U', '30RP1UdY', 'KdvbN', 'ljBPmC9H9', 'tU']1616 >>> s = lambda p: p == 'KdvbN' or p == 'Ukq' or p == 'ljBPmC9H9'1617 >>> choose(ps, s, 0)1618 'Ukq'1619 >>> choose(ps, s, 1)1620 'KdvbN'1621 >>> choose(ps, s, 2)1622 'ljBPmC9H9'1623 >>> choose(ps, s, 3)1624 ''1625 >>> choose(ps, s, 4)1626 ''1627 >>> choose(ps, s, 5)1628 ''1629 >>> choose(ps, s, 6)1630 ''1631 >>> choose(ps, s, 7)1632 ''1633 """,1634 'hidden': False,1635 'locked': False1636 },1637 {1638 'code': r"""1639 >>> ps = ['ejCQLlFjJJ', 'kVEFL19YZ', 'NV6F', 'Ub7QK0', 'zgp', 'MhPk5BZw', 'NTvvrJI971', 'x7GXW1D', 'tx2CUL']1640 >>> s = lambda p: p == 'NTvvrJI971' or p == 'NV6F' or p == 'kVEFL19YZ' or p == 'x7GXW1D' or p == 'zgp'1641 >>> choose(ps, s, 0)1642 'kVEFL19YZ'1643 >>> choose(ps, s, 1)1644 'NV6F'1645 >>> choose(ps, s, 2)1646 'zgp'1647 >>> choose(ps, s, 3)1648 'NTvvrJI971'1649 >>> choose(ps, s, 4)1650 'x7GXW1D'1651 >>> choose(ps, s, 5)1652 ''1653 >>> choose(ps, s, 6)1654 ''1655 >>> choose(ps, s, 7)1656 ''1657 >>> choose(ps, s, 8)1658 ''1659 >>> choose(ps, s, 9)1660 ''1661 >>> choose(ps, s, 10)1662 ''1663 """,1664 'hidden': False,1665 'locked': False1666 },1667 {1668 'code': r"""1669 >>> ps = ['t', 'ia', 'IrGh3gZ', 'TMQ0KWEaqu', 'S', 't5', 'JkkzgRT', 'R']1670 >>> s = lambda p: p == 'IrGh3gZ' or p == 'R' or p == 'TMQ0KWEaqu' or p == 'ia'1671 >>> choose(ps, s, 0)1672 'ia'1673 >>> choose(ps, s, 1)1674 'IrGh3gZ'1675 >>> choose(ps, s, 2)1676 'TMQ0KWEaqu'1677 >>> choose(ps, s, 3)1678 'R'1679 >>> choose(ps, s, 4)1680 ''1681 >>> choose(ps, s, 5)1682 ''1683 >>> choose(ps, s, 6)1684 ''1685 >>> choose(ps, s, 7)1686 ''1687 >>> choose(ps, s, 8)1688 ''1689 >>> choose(ps, s, 9)1690 ''1691 """,1692 'hidden': False,1693 'locked': False1694 },1695 {1696 'code': r"""1697 >>> ps = ['haAQbpI9']1698 >>> s = lambda p: False1699 >>> choose(ps, s, 0)1700 ''1701 >>> choose(ps, s, 1)1702 ''1703 >>> choose(ps, s, 2)1704 ''1705 """,1706 'hidden': False,1707 'locked': False1708 },1709 {1710 'code': r"""1711 >>> ps = ['uRLyF', '5', '1StG72K2', '1Vopk', 'J7blr5gu', '48HObQ', 'ZeDZPCa']1712 >>> s = lambda p: p == '1StG72K2' or p == '1Vopk' or p == 'J7blr5gu' or p == 'ZeDZPCa'1713 >>> choose(ps, s, 0)1714 '1StG72K2'1715 >>> choose(ps, s, 1)1716 '1Vopk'1717 >>> choose(ps, s, 2)1718 'J7blr5gu'1719 >>> choose(ps, s, 3)1720 'ZeDZPCa'1721 >>> choose(ps, s, 4)1722 ''1723 >>> choose(ps, s, 5)1724 ''1725 >>> choose(ps, s, 6)1726 ''1727 >>> choose(ps, s, 7)1728 ''1729 >>> choose(ps, s, 8)1730 ''1731 """,1732 'hidden': False,1733 'locked': False1734 },1735 {1736 'code': r"""1737 >>> ps = ['xOP24D0', 'Zodm4', 'uwMG3', 'Mezx', 'Cnx']1738 >>> s = lambda p: p == 'Cnx' or p == 'Zodm4' or p == 'uwMG3'1739 >>> choose(ps, s, 0)1740 'Zodm4'1741 >>> choose(ps, s, 1)1742 'uwMG3'1743 >>> choose(ps, s, 2)1744 'Cnx'1745 >>> choose(ps, s, 3)1746 ''1747 >>> choose(ps, s, 4)1748 ''1749 >>> choose(ps, s, 5)1750 ''1751 >>> choose(ps, s, 6)1752 ''1753 """,1754 'hidden': False,1755 'locked': False1756 },1757 {1758 'code': r"""1759 >>> ps = ['uysO', 'xr', 'QlQVnYpC', '60cnCRSFpD', 'KJMpWnm', 'JtCa62c', 'pucq0LauM2']1760 >>> s = lambda p: p == 'JtCa62c' or p == 'KJMpWnm' or p == 'QlQVnYpC' or p == 'pucq0LauM2'1761 >>> choose(ps, s, 0)1762 'QlQVnYpC'1763 >>> choose(ps, s, 1)1764 'KJMpWnm'1765 >>> choose(ps, s, 2)1766 'JtCa62c'1767 >>> choose(ps, s, 3)1768 'pucq0LauM2'1769 >>> choose(ps, s, 4)1770 ''1771 >>> choose(ps, s, 5)1772 ''1773 >>> choose(ps, s, 6)1774 ''1775 >>> choose(ps, s, 7)1776 ''1777 >>> choose(ps, s, 8)1778 ''1779 """,1780 'hidden': False,1781 'locked': False1782 },1783 {1784 'code': r"""1785 >>> ps = ['kYdw', 'xZprfY0a', 'jCUQeZSTYC', 'ozip', 'fG4pdENZ', 'W79']1786 >>> s = lambda p: p == 'ozip'1787 >>> choose(ps, s, 0)1788 'ozip'1789 >>> choose(ps, s, 1)1790 ''1791 >>> choose(ps, s, 2)1792 ''1793 >>> choose(ps, s, 3)1794 ''1795 >>> choose(ps, s, 4)1796 ''1797 >>> choose(ps, s, 5)1798 ''1799 >>> choose(ps, s, 6)1800 ''1801 >>> choose(ps, s, 7)1802 ''1803 """,1804 'hidden': False,1805 'locked': False1806 },1807 {1808 'code': r"""1809 >>> ps = ['4U', 'XX9Q', 'dP']1810 >>> s = lambda p: p == 'XX9Q'1811 >>> choose(ps, s, 0)1812 'XX9Q'1813 >>> choose(ps, s, 1)1814 ''1815 >>> choose(ps, s, 2)1816 ''1817 >>> choose(ps, s, 3)1818 ''1819 >>> choose(ps, s, 4)1820 ''1821 """,1822 'hidden': False,1823 'locked': False1824 },1825 {1826 'code': r"""1827 >>> ps = ['dBn', 'FIUqoQH', 'Rd']1828 >>> s = lambda p: p == 'FIUqoQH' or p == 'Rd' or p == 'dBn'1829 >>> choose(ps, s, 0)1830 'dBn'1831 >>> choose(ps, s, 1)1832 'FIUqoQH'1833 >>> choose(ps, s, 2)1834 'Rd'1835 >>> choose(ps, s, 3)1836 ''1837 >>> choose(ps, s, 4)1838 ''1839 """,1840 'hidden': False,1841 'locked': False1842 },1843 {1844 'code': r"""1845 >>> ps = ['ONaaOd86', 'ieq1a']1846 >>> s = lambda p: False1847 >>> choose(ps, s, 0)1848 ''1849 >>> choose(ps, s, 1)1850 ''1851 >>> choose(ps, s, 2)1852 ''1853 >>> choose(ps, s, 3)1854 ''1855 """,1856 'hidden': False,1857 'locked': False1858 },1859 {1860 'code': r"""1861 >>> ps = ['418oTaUHk6']1862 >>> s = lambda p: False1863 >>> choose(ps, s, 0)1864 ''1865 >>> choose(ps, s, 1)1866 ''1867 >>> choose(ps, s, 2)1868 ''1869 """,1870 'hidden': False,1871 'locked': False1872 },1873 {1874 'code': r"""1875 >>> ps = []1876 >>> s = lambda p: False1877 >>> choose(ps, s, 0)1878 ''1879 >>> choose(ps, s, 1)1880 ''1881 """,1882 'hidden': False,1883 'locked': False1884 },1885 {1886 'code': r"""1887 >>> ps = ['S', 'OjBP', 'Tr6n34PS8D', 'o60Xa']1888 >>> s = lambda p: p == 'OjBP' or p == 'S' or p == 'o60Xa'1889 >>> choose(ps, s, 0)1890 'S'1891 >>> choose(ps, s, 1)1892 'OjBP'1893 >>> choose(ps, s, 2)1894 'o60Xa'1895 >>> choose(ps, s, 3)1896 ''1897 >>> choose(ps, s, 4)1898 ''1899 >>> choose(ps, s, 5)1900 ''1901 """,1902 'hidden': False,1903 'locked': False1904 },1905 {1906 'code': r"""1907 >>> ps = ['gZGj8G9', 'tJOJixv2E', 'Rzt', 'uSlA95Kop', 'uPNkjiUV9K', 'WjTvFY']1908 >>> s = lambda p: p == 'Rzt' or p == 'uPNkjiUV9K' or p == 'uSlA95Kop'1909 >>> choose(ps, s, 0)1910 'Rzt'1911 >>> choose(ps, s, 1)1912 'uSlA95Kop'1913 >>> choose(ps, s, 2)1914 'uPNkjiUV9K'1915 >>> choose(ps, s, 3)1916 ''1917 >>> choose(ps, s, 4)1918 ''1919 >>> choose(ps, s, 5)1920 ''1921 >>> choose(ps, s, 6)1922 ''1923 >>> choose(ps, s, 7)1924 ''1925 """,1926 'hidden': False,1927 'locked': False1928 },1929 {1930 'code': r"""1931 >>> ps = ['p', 'Qu', 'HWfS6W', 'Hle', 'AzhNgkwD', 'nbWO', 'qGf3vd9', 'nQ1VdUxn7Z']1932 >>> s = lambda p: p == 'HWfS6W' or p == 'p' or p == 'qGf3vd9'1933 >>> choose(ps, s, 0)1934 'p'1935 >>> choose(ps, s, 1)1936 'HWfS6W'1937 >>> choose(ps, s, 2)1938 'qGf3vd9'1939 >>> choose(ps, s, 3)1940 ''1941 >>> choose(ps, s, 4)1942 ''1943 >>> choose(ps, s, 5)1944 ''1945 >>> choose(ps, s, 6)1946 ''1947 >>> choose(ps, s, 7)1948 ''1949 >>> choose(ps, s, 8)1950 ''1951 >>> choose(ps, s, 9)1952 ''1953 """,1954 'hidden': False,1955 'locked': False1956 },1957 {1958 'code': r"""1959 >>> ps = ['TwRL6', 's8HA7NEy9', 'x']1960 >>> s = lambda p: p == 'x'1961 >>> choose(ps, s, 0)1962 'x'1963 >>> choose(ps, s, 1)1964 ''1965 >>> choose(ps, s, 2)1966 ''1967 >>> choose(ps, s, 3)1968 ''1969 >>> choose(ps, s, 4)1970 ''1971 """,1972 'hidden': False,1973 'locked': False1974 },1975 {1976 'code': r"""1977 >>> ps = ['Ne6L', 'kGR']1978 >>> s = lambda p: p == 'Ne6L'1979 >>> choose(ps, s, 0)1980 'Ne6L'1981 >>> choose(ps, s, 1)1982 ''1983 >>> choose(ps, s, 2)1984 ''1985 >>> choose(ps, s, 3)1986 ''1987 """,1988 'hidden': False,1989 'locked': False1990 },1991 {1992 'code': r"""1993 >>> ps = ['D0D', 'LcCQ1']1994 >>> s = lambda p: False1995 >>> choose(ps, s, 0)1996 ''1997 >>> choose(ps, s, 1)1998 ''1999 >>> choose(ps, s, 2)2000 ''2001 >>> choose(ps, s, 3)2002 ''2003 """,2004 'hidden': False,2005 'locked': False2006 },2007 {2008 'code': r"""2009 >>> ps = ['lgp', '6o6Hu5GB', 'I']2010 >>> s = lambda p: p == '6o6Hu5GB'2011 >>> choose(ps, s, 0)2012 '6o6Hu5GB'2013 >>> choose(ps, s, 1)2014 ''2015 >>> choose(ps, s, 2)2016 ''2017 >>> choose(ps, s, 3)2018 ''2019 >>> choose(ps, s, 4)2020 ''2021 """,2022 'hidden': False,2023 'locked': False2024 },2025 {2026 'code': r"""2027 >>> ps = ['ypHvW', '05ZvX', 'ih', 'y', '3lfSRPXYUp']2028 >>> s = lambda p: p == '05ZvX' or p == 'ih' or p == 'y'2029 >>> choose(ps, s, 0)2030 '05ZvX'2031 >>> choose(ps, s, 1)2032 'ih'2033 >>> choose(ps, s, 2)2034 'y'2035 >>> choose(ps, s, 3)2036 ''2037 >>> choose(ps, s, 4)2038 ''2039 >>> choose(ps, s, 5)2040 ''2041 >>> choose(ps, s, 6)2042 ''2043 """,2044 'hidden': False,2045 'locked': False2046 },2047 {2048 'code': r"""2049 >>> ps = ['L', 'YwD5']2050 >>> s = lambda p: p == 'YwD5'2051 >>> choose(ps, s, 0)2052 'YwD5'2053 >>> choose(ps, s, 1)2054 ''2055 >>> choose(ps, s, 2)2056 ''2057 >>> choose(ps, s, 3)2058 ''2059 """,2060 'hidden': False,2061 'locked': False2062 },2063 {2064 'code': r"""2065 >>> ps = ['t2fcKxcHGV', 'hcOr0', 'N7VV', 'Ktu9', '10E', 'Fi']2066 >>> s = lambda p: p == 'hcOr0'2067 >>> choose(ps, s, 0)2068 'hcOr0'2069 >>> choose(ps, s, 1)2070 ''2071 >>> choose(ps, s, 2)2072 ''2073 >>> choose(ps, s, 3)2074 ''2075 >>> choose(ps, s, 4)2076 ''2077 >>> choose(ps, s, 5)2078 ''2079 >>> choose(ps, s, 6)2080 ''2081 >>> choose(ps, s, 7)2082 ''2083 """,2084 'hidden': False,2085 'locked': False2086 },2087 {2088 'code': r"""2089 >>> ps = ['S0HHc29', 'VjcL88A', '9Y', '8THN']2090 >>> s = lambda p: p == '9Y' or p == 'S0HHc29'2091 >>> choose(ps, s, 0)2092 'S0HHc29'2093 >>> choose(ps, s, 1)2094 '9Y'2095 >>> choose(ps, s, 2)2096 ''2097 >>> choose(ps, s, 3)2098 ''2099 >>> choose(ps, s, 4)2100 ''2101 >>> choose(ps, s, 5)2102 ''2103 """,2104 'hidden': False,2105 'locked': False2106 },2107 {2108 'code': r"""2109 >>> ps = ['Z1hCZfe4s9', 'uDSu', 'eJonD']2110 >>> s = lambda p: False2111 >>> choose(ps, s, 0)2112 ''2113 >>> choose(ps, s, 1)2114 ''2115 >>> choose(ps, s, 2)2116 ''2117 >>> choose(ps, s, 3)2118 ''2119 >>> choose(ps, s, 4)2120 ''2121 """,2122 'hidden': False,2123 'locked': False2124 },2125 {2126 'code': r"""2127 >>> ps = ['behMPcxcjj', 'cAPdpB', 'egujs2jv', '2kEi6Y']2128 >>> s = lambda p: p == 'behMPcxcjj' or p == 'cAPdpB' or p == 'egujs2jv'2129 >>> choose(ps, s, 0)2130 'behMPcxcjj'2131 >>> choose(ps, s, 1)2132 'cAPdpB'2133 >>> choose(ps, s, 2)2134 'egujs2jv'2135 >>> choose(ps, s, 3)2136 ''2137 >>> choose(ps, s, 4)2138 ''2139 >>> choose(ps, s, 5)2140 ''2141 """,2142 'hidden': False,2143 'locked': False2144 },2145 {2146 'code': r"""2147 >>> ps = ['5OjO']2148 >>> s = lambda p: False2149 >>> choose(ps, s, 0)2150 ''2151 >>> choose(ps, s, 1)2152 ''2153 >>> choose(ps, s, 2)2154 ''2155 """,2156 'hidden': False,2157 'locked': False2158 }2159 ],2160 'scored': True,2161 'setup': r"""2162 >>> from cats import choose2163 """,2164 'teardown': '',2165 'type': 'doctest'2166 }2167 ]...
recommend_dto.py
Source:recommend_dto.py
1from com_cheese_api.usr.user.model.user_dto import UserDto2import numpy as np3import pandas as pd4from pathlib import Path5from com_cheese_api.ext.db import url, db, openSession, engine6import os7import json8class RecommendDto(db.Model):9 __tablename__ = 'recommends'10 __table_args__ = {'mysql_collate':'utf8_general_ci'}11 # recommend_id: str = db.Column(db.String(20), primary_key=True, index=True)12 user_id = db.Column(db.String(20), primary_key=True, index=True)13 chooseFood_1: str = db.Column(db.String(100))14 chooseFood_2: str = db.Column(db.String(100))15 chooseFood_3: str = db.Column(db.String(100))16 chooseFood_4: str = db.Column(db.String(100))17 # user_id = db.Column(db.String(20), db.ForeignKey(UserDto.user_id)) # FK(user_id)18 19 # orders = db.relationship('OrderDto', back_populates='user', lazy='dynamic')20 # cheeses = db.relationship('CheeseDto', back_populates='users', lazy='dynamic')21 # reviews = db.relationship('ReviewDto', back_populates='user', lazy='dynamic')22 23 # ê´ê³ ì¤ì 24 #reviews = db.relationship('ReviewDto', back_populates='users')25 def __init__(self, user_id, chooseFood_1, chooseFood_2, chooseFood_3, chooseFood_4):26 # self.recommend_id = recommend_id27 self.user_id = user_id28 self.chooseFood_1 = chooseFood_129 self.chooseFood_2 = chooseFood_230 self.chooseFood_3 = chooseFood_331 self.chooseFood_4 = chooseFood_432 # def __repr__(self):33 # return f'recommend_id={self.recommend_id}, chooseFood_1={self.chooseFood_1}, chooseFood_2={self.chooseFood_2}, \34 # user_id = {self.user_id}'35 # def __str__(self):36 # return f'recommend_id={self.recommend_id}, chooseFood_1={self.chooseFood_1}, chooseFood_2={self.chooseFood_2}, \37 # user_id = {self.user_id}'38 def __repr__(self):39 return f'user_id = {self.user_id}chooseFood_1={self.chooseFood_1}, chooseFood_2={self.chooseFood_2}, \40 chooseFood_3={self.chooseFood_3}, chooseFood_4={self.chooseFood_4}'41 def __str__(self):42 return f'user_id = {self.user_id}, chooseFood_1={self.chooseFood_1}, chooseFood_2={self.chooseFood_2}, \43 chooseFood_3={self.chooseFood_3}, chooseFood_4={self.chooseFood_4}'44 @property45 def json(self):46 return {47 # 'recommend_id' : self.recommend_id,48 'user_id': self.user_id,49 'chooseFood_1': self.chooseFood_1,50 'chooseFood_2': self.chooseFood_2,51 'chooseFood_3': self.chooseFood_3,52 'chooseFood_4': self.chooseFood_453 }54# Json ííë¡ ì°ê¸° ìí´ ì!55class RecommendVo():56 # recommend_id: str = ''57 user_id: str = ''58 chooseFood_1: str = ''59 chooseFood_2: str = ''60 chooseFood_3: str=''61 chooseFood_4: str=''62# db.init_app(app)63# with app.app_context():...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!