From 08d7ce399970b04705e937323d11fae910ddaf94 Mon Sep 17 00:00:00 2001 From: s464968 Date: Sat, 5 Nov 2022 19:53:13 +0100 Subject: [PATCH] Zadania B --- B/B01.py | 29 ++ B/BO2.py | 22 ++ B/BO3.py | 11 + B/BO4.py | 22 ++ B/MOCK_DATA.csv | 1000 +++++++++++++++++++++++++++++++++++++++++++++++ B/emails.txt | 31 ++ B/test_B01.py | 28 ++ B/test_BO3.py | 50 +++ 8 files changed, 1193 insertions(+) create mode 100644 B/B01.py create mode 100644 B/BO2.py create mode 100644 B/BO3.py create mode 100644 B/BO4.py create mode 100644 B/MOCK_DATA.csv create mode 100644 B/emails.txt create mode 100644 B/test_B01.py create mode 100644 B/test_BO3.py diff --git a/B/B01.py b/B/B01.py new file mode 100644 index 0000000..1b89626 --- /dev/null +++ b/B/B01.py @@ -0,0 +1,29 @@ +import regex as re + + +def is_name_correct(name: str) -> bool: + result = re.match(r'^(\p{Lu}|\p{Lt}).+$', name) + return True if result else False + + +def is_phone_correct(name: str) -> bool: + result = re.match(r'^\(\d{2}\)\s*\d{3}-\d{2}-\d{2}', name) + return True if result else False + + +def is_zipcode_correct(name: str) -> bool: + result = re.match(r'^\d{2}-\d{3}$', name) + return True if result else False + + +first_name = input("Poda imie: ") +second_name = input("Poda nazwisko: ") +city = input("Poda nazwe miasta: ") +phone_number = input("Poda numer telefonu: ") +zip_code = input("Poda kod pocztowy: ") + +print("Imie poprawne!") if is_name_correct(first_name) else print("Imie niepoprawne!") +print("Nazwisko poprawne!") if is_name_correct(second_name) else print("Nazwisko niepoprawne!") +print("Miasto poprawne!") if is_name_correct(city) else print("Miasto niepoprawne!") +print("Telefon poprawny!") if is_phone_correct(phone_number) else print("Telefon niepoprawny!") +print("Kod pocztowy poprawny!") if is_zipcode_correct(zip_code) else print("Kod pocztowy niepoprawny!") diff --git a/B/BO2.py b/B/BO2.py new file mode 100644 index 0000000..4e4a60f --- /dev/null +++ b/B/BO2.py @@ -0,0 +1,22 @@ +import regex as re + + +def is_line_correct(line: str) -> bool: + result = re.match(r'^.+;\d+;\d+$', line) + return True if result else False + + +def is_correct_csv(file_name: str) -> bool: + file = open(file_name, 'r') + is_correct = True + for line in file: + is_correct = is_correct and is_line_correct(line) + if not is_correct: + break + file.close() + return is_correct + + +if __name__ == '__main__': + file_n = input('Podaj nazwe pliku csv: ') + print('Plik CSV jest poprawny!') if is_correct_csv(file_n) else print('Plik CSV jest niepoprawny!') \ No newline at end of file diff --git a/B/BO3.py b/B/BO3.py new file mode 100644 index 0000000..78de528 --- /dev/null +++ b/B/BO3.py @@ -0,0 +1,11 @@ +import regex as re + + +def replace_vulgarism(usr_input: str) -> str: + return re.sub(r'\p{Ll}*(chuj|pizd|jeb|pierd|kur)\p{Ll}*', '---', usr_input, flags=re.IGNORECASE) + + +if __name__ == '__main__': + usr_input = input("Podaj przykładowe zdanie: ") + print("Zdanie zmienione: ") + print(replace_vulgarism(usr_input)) \ No newline at end of file diff --git a/B/BO4.py b/B/BO4.py new file mode 100644 index 0000000..b8c423f --- /dev/null +++ b/B/BO4.py @@ -0,0 +1,22 @@ +import regex as re + + +def get_email_addresses(usr_input: str) -> list: + return re.findall(r"^[A-Za-z0-9!#$%&'*+=?^_`{|}~.\-\/]{1,64}@[a-zA-Z0-9.\-]+$", usr_input) + + +def return_email_addresses_in_file(file_name: str) -> list: + f = open(file_name, "r") + email_addresses = [] + for line in f: + email_addresses_from_line = get_email_addresses(line) + if email_addresses_from_line: + email_addresses.append(email_addresses_from_line) + f.close() + return email_addresses + + +if __name__ == '__main__': + usr_input = input("Podaj nazwe pliku: ") + for email in return_email_addresses_in_file(usr_input): + print(email) diff --git a/B/MOCK_DATA.csv b/B/MOCK_DATA.csv new file mode 100644 index 0000000..e9f1d48 --- /dev/null +++ b/B/MOCK_DATA.csv @@ -0,0 +1,1000 @@ +Trippledex;1;1 +Fintone;2;2 +Zathin;3;3 +Quo Lux;4;4 +Latlux;5;5 +Viva;6;6 +Cookley;7;7 +Ronstring;8;8 +Namfix;9;9 +Fintone;10;10 +Voltsillam;11;11 +Lotlux;12;12 +Treeflex;13;13 +Quo Lux;14;14 +Toughjoyfax;15;15 +Sub-Ex;16;16 +Ventosanzap;17;17 +Daltfresh;18;18 +Quo Lux;19;19 +Vagram;20;20 +Bytecard;21;21 +Fintone;22;22 +Regrant;23;23 +Opela;24;24 +Alpha;25;25 +Voyatouch;26;26 +Greenlam;27;27 +Overhold;28;28 +Lotlux;29;29 +Cardguard;30;30 +Duobam;31;31 +Mat Lam Tam;32;32 +Y-find;33;33 +Otcom;34;34 +Domainer;35;35 +Voltsillam;36;36 +Konklab;37;37 +Gembucket;38;38 +Greenlam;39;39 +Gembucket;40;40 +Cardify;41;41 +Flowdesk;42;42 +Ronstring;43;43 +Flowdesk;44;44 +Namfix;45;45 +Voyatouch;46;46 +Redhold;47;47 +Sub-Ex;48;48 +Fixflex;49;49 +Aerified;50;50 +Zoolab;51;51 +Tres-Zap;52;52 +Holdlamis;53;53 +Home Ing;54;54 +Prodder;55;55 +Temp;56;56 +Konklux;57;57 +Cardguard;58;58 +Alpha;59;59 +Quo Lux;60;60 +Cookley;61;61 +Lotlux;62;62 +Cardify;63;63 +Tin;64;64 +Andalax;65;65 +Ronstring;66;66 +Zoolab;67;67 +Rank;68;68 +It;69;69 +Quo Lux;70;70 +Holdlamis;71;71 +Konklab;72;72 +Quo Lux;73;73 +Stronghold;74;74 +Lotstring;75;75 +Otcom;76;76 +Keylex;77;77 +Namfix;78;78 +Flexidy;79;79 +Tres-Zap;80;80 +Zoolab;81;81 +Bytecard;82;82 +Andalax;83;83 +Y-Solowarm;84;84 +Fintone;85;85 +Alpha;86;86 +Toughjoyfax;87;87 +Redhold;88;88 +Lotlux;89;89 +Keylex;90;90 +Otcom;91;91 +Stringtough;92;92 +Bamity;93;93 +Voltsillam;94;94 +Viva;95;95 +Holdlamis;96;96 +Overhold;97;97 +Bamity;98;98 +It;99;99 +Overhold;100;100 +Bamity;101;101 +Fintone;102;102 +Tresom;103;103 +Voltsillam;104;104 +Vagram;105;105 +Konklux;106;106 +Temp;107;107 +Fintone;108;108 +Cardguard;109;109 +Y-Solowarm;110;110 +Opela;111;111 +Kanlam;112;112 +Tempsoft;113;113 +Lotstring;114;114 +Biodex;115;115 +Bitwolf;116;116 +Cookley;117;117 +Lotlux;118;118 +Ronstring;119;119 +Sonsing;120;120 +Ventosanzap;121;121 +Regrant;122;122 +Sub-Ex;123;123 +Alphazap;124;124 +Tempsoft;125;125 +Bitwolf;126;126 +Vagram;127;127 +Andalax;128;128 +Duobam;129;129 +Fintone;130;130 +Aerified;131;131 +Solarbreeze;132;132 +Hatity;133;133 +Stronghold;134;134 +Bytecard;135;135 +Matsoft;136;136 +Keylex;137;137 +Matsoft;138;138 +Bytecard;139;139 +Lotlux;140;140 +Cookley;141;141 +Fintone;142;142 +Konklab;143;143 +Cardguard;144;144 +Andalax;145;145 +Holdlamis;146;146 +Mat Lam Tam;147;147 +Redhold;148;148 +Alpha;149;149 +Bamity;150;150 +Latlux;151;151 +Mat Lam Tam;152;152 +Prodder;153;153 +Sonsing;154;154 +Tin;155;155 +Veribet;156;156 +Fixflex;157;157 +Viva;158;158 +Home Ing;159;159 +Cardguard;160;160 +Stim;161;161 +Trippledex;162;162 +Bytecard;163;163 +Regrant;164;164 +Viva;165;165 +Ronstring;166;166 +Voyatouch;167;167 +Konklux;168;168 +Cardify;169;169 +Prodder;170;170 +Rank;171;171 +Solarbreeze;172;172 +Gembucket;173;173 +Matsoft;174;174 +Cookley;175;175 +Matsoft;176;176 +Y-find;177;177 +Ronstring;178;178 +Ventosanzap;179;179 +Lotlux;180;180 +Stronghold;181;181 +Cookley;182;182 +Y-Solowarm;183;183 +It;184;184 +Subin;185;185 +Domainer;186;186 +Zontrax;187;187 +Greenlam;188;188 +Stronghold;189;189 +Opela;190;190 +Pannier;191;191 +Toughjoyfax;192;192 +Holdlamis;193;193 +Y-find;194;194 +Kanlam;195;195 +Veribet;196;196 +Subin;197;197 +Bitchip;198;198 +Subin;199;199 +Vagram;200;200 +Tres-Zap;201;201 +Keylex;202;202 +Tresom;203;203 +Treeflex;204;204 +Cardguard;205;205 +Y-Solowarm;206;206 +Sonsing;207;207 +Span;208;208 +Ronstring;209;209 +Tampflex;210;210 +Latlux;211;211 +Subin;212;212 +Redhold;213;213 +Matsoft;214;214 +Zamit;215;215 +Domainer;216;216 +Lotstring;217;217 +Latlux;218;218 +Overhold;219;219 +Tempsoft;220;220 +Lotlux;221;221 +Bitwolf;222;222 +Bitwolf;223;223 +Latlux;224;224 +Temp;225;225 +Sonair;226;226 +Mat Lam Tam;227;227 +Zontrax;228;228 +Greenlam;229;229 +Y-Solowarm;230;230 +Alpha;231;231 +Asoka;232;232 +Alpha;233;233 +Gembucket;234;234 +Job;235;235 +Sub-Ex;236;236 +Fixflex;237;237 +Fintone;238;238 +Temp;239;239 +Stim;240;240 +Temp;241;241 +Kanlam;242;242 +Zontrax;243;243 +Zathin;244;244 +Namfix;245;245 +Kanlam;246;246 +Bigtax;247;247 +Vagram;248;248 +Cookley;249;249 +Lotlux;250;250 +Sub-Ex;251;251 +Keylex;252;252 +Fintone;253;253 +Bamity;254;254 +Stringtough;255;255 +Hatity;256;256 +Bamity;257;257 +Temp;258;258 +Alpha;259;259 +Duobam;260;260 +Lotstring;261;261 +Voltsillam;262;262 +Lotstring;263;263 +Stim;264;264 +Wrapsafe;265;265 +Wrapsafe;266;266 +Redhold;267;267 +Prodder;268;268 +Sonair;269;269 +Bitchip;270;270 +Tampflex;271;271 +Viva;272;272 +Tampflex;273;273 +Greenlam;274;274 +Ventosanzap;275;275 +Tempsoft;276;276 +Prodder;277;277 +Bamity;278;278 +Quo Lux;279;279 +Rank;280;280 +Overhold;281;281 +Subin;282;282 +Sonair;283;283 +Vagram;284;284 +Stim;285;285 +Bamity;286;286 +Sub-Ex;287;287 +Bytecard;288;288 +Viva;289;289 +Alpha;290;290 +It;291;291 +Matsoft;292;292 +Bytecard;293;293 +Zamit;294;294 +Tin;295;295 +Mat Lam Tam;296;296 +Sub-Ex;297;297 +Bytecard;298;298 +Voltsillam;299;299 +Latlux;300;300 +Bitchip;301;301 +Zathin;302;302 +Tampflex;303;303 +Y-Solowarm;304;304 +Toughjoyfax;305;305 +Sub-Ex;306;306 +Zamit;307;307 +Zaam-Dox;308;308 +Overhold;309;309 +Tres-Zap;310;310 +Treeflex;311;311 +Domainer;312;312 +Bigtax;313;313 +Opela;314;314 +Otcom;315;315 +Flexidy;316;316 +Zontrax;317;317 +Matsoft;318;318 +Regrant;319;319 +Kanlam;320;320 +Vagram;321;321 +Pannier;322;322 +Subin;323;323 +Sonsing;324;324 +Opela;325;325 +Fix San;326;326 +Konklux;327;327 +Treeflex;328;328 +Tres-Zap;329;329 +Biodex;330;330 +Veribet;331;331 +Fixflex;332;332 +It;333;333 +Bytecard;334;334 +Flowdesk;335;335 +Kanlam;336;336 +Cardguard;337;337 +It;338;338 +Fix San;339;339 +Veribet;340;340 +Zoolab;341;341 +Daltfresh;342;342 +Konklux;343;343 +Ventosanzap;344;344 +Zaam-Dox;345;345 +Ventosanzap;346;346 +Otcom;347;347 +Cardify;348;348 +Mat Lam Tam;349;349 +It;350;350 +Mat Lam Tam;351;351 +Namfix;352;352 +Andalax;353;353 +Daltfresh;354;354 +Bitwolf;355;355 +Voyatouch;356;356 +Voltsillam;357;357 +Bamity;358;358 +Zathin;359;359 +Sonair;360;360 +Otcom;361;361 +Sonsing;362;362 +Flowdesk;363;363 +Regrant;364;364 +Tres-Zap;365;365 +Bytecard;366;366 +Subin;367;367 +Lotstring;368;368 +Fintone;369;369 +Konklux;370;370 +Latlux;371;371 +Veribet;372;372 +Latlux;373;373 +Flowdesk;374;374 +Treeflex;375;375 +Mat Lam Tam;376;376 +Bigtax;377;377 +Treeflex;378;378 +Veribet;379;379 +Regrant;380;380 +Matsoft;381;381 +Bytecard;382;382 +Zoolab;383;383 +Voyatouch;384;384 +Sonsing;385;385 +Andalax;386;386 +Sonair;387;387 +Duobam;388;388 +Bitchip;389;389 +Daltfresh;390;390 +Cardify;391;391 +Asoka;392;392 +Namfix;393;393 +Opela;394;394 +Konklab;395;395 +Kanlam;396;396 +Fixflex;397;397 +Holdlamis;398;398 +Aerified;399;399 +Redhold;400;400 +Greenlam;401;401 +Ronstring;402;402 +Job;403;403 +Otcom;404;404 +Sonsing;405;405 +It;406;406 +Fix San;407;407 +Fintone;408;408 +Gembucket;409;409 +Zoolab;410;410 +Home Ing;411;411 +Regrant;412;412 +Stringtough;413;413 +Stringtough;414;414 +Zoolab;415;415 +Flexidy;416;416 +Lotstring;417;417 +Otcom;418;418 +Hatity;419;419 +Stronghold;420;420 +Tresom;421;421 +Zontrax;422;422 +Biodex;423;423 +Aerified;424;424 +Tresom;425;425 +Matsoft;426;426 +Asoka;427;427 +Prodder;428;428 +Konklux;429;429 +Sub-Ex;430;430 +Cardify;431;431 +Alphazap;432;432 +Tin;433;433 +Voltsillam;434;434 +Solarbreeze;435;435 +Y-find;436;436 +Voltsillam;437;437 +Latlux;438;438 +Greenlam;439;439 +Alphazap;440;440 +Wrapsafe;441;441 +Mat Lam Tam;442;442 +Fix San;443;443 +Tampflex;444;444 +Greenlam;445;445 +Bytecard;446;446 +Cardify;447;447 +Y-Solowarm;448;448 +Solarbreeze;449;449 +Y-Solowarm;450;450 +Zontrax;451;451 +Stronghold;452;452 +Mat Lam Tam;453;453 +Bitchip;454;454 +Job;455;455 +Namfix;456;456 +Tempsoft;457;457 +Domainer;458;458 +Zoolab;459;459 +Ventosanzap;460;460 +Zathin;461;461 +Asoka;462;462 +It;463;463 +Bigtax;464;464 +Aerified;465;465 +Transcof;466;466 +Solarbreeze;467;467 +Overhold;468;468 +Keylex;469;469 +Biodex;470;470 +Sonsing;471;471 +Kanlam;472;472 +Voyatouch;473;473 +Zathin;474;474 +Veribet;475;475 +Konklux;476;476 +Voltsillam;477;477 +Latlux;478;478 +Mat Lam Tam;479;479 +Cardguard;480;480 +Zathin;481;481 +Voyatouch;482;482 +Zathin;483;483 +Lotstring;484;484 +Bigtax;485;485 +Stringtough;486;486 +Duobam;487;487 +Y-find;488;488 +Veribet;489;489 +Transcof;490;490 +Tempsoft;491;491 +Bitchip;492;492 +Tempsoft;493;493 +Toughjoyfax;494;494 +Y-Solowarm;495;495 +Alphazap;496;496 +Otcom;497;497 +Greenlam;498;498 +Sonsing;499;499 +Voltsillam;500;500 +Hatity;501;501 +Voltsillam;502;502 +Otcom;503;503 +Sonsing;504;504 +Kanlam;505;505 +Otcom;506;506 +Viva;507;507 +Flexidy;508;508 +Voyatouch;509;509 +Stringtough;510;510 +Bitchip;511;511 +Keylex;512;512 +Transcof;513;513 +Job;514;514 +Daltfresh;515;515 +Sonair;516;516 +Andalax;517;517 +Redhold;518;518 +Bitchip;519;519 +Alpha;520;520 +Mat Lam Tam;521;521 +Zontrax;522;522 +Sonair;523;523 +Bitchip;524;524 +Sonair;525;525 +Matsoft;526;526 +Tin;527;527 +Ronstring;528;528 +Andalax;529;529 +Kanlam;530;530 +Bigtax;531;531 +Alphazap;532;532 +Trippledex;533;533 +Mat Lam Tam;534;534 +Domainer;535;535 +Latlux;536;536 +Treeflex;537;537 +Quo Lux;538;538 +Opela;539;539 +Sonsing;540;540 +Keylex;541;541 +Namfix;542;542 +Opela;543;543 +Rank;544;544 +Holdlamis;545;545 +Lotstring;546;546 +Cookley;547;547 +Tin;548;548 +Bigtax;549;549 +Fixflex;550;550 +Aerified;551;551 +Treeflex;552;552 +Matsoft;553;553 +Alpha;554;554 +Tres-Zap;555;555 +Holdlamis;556;556 +Vagram;557;557 +Andalax;558;558 +Greenlam;559;559 +Keylex;560;560 +Cardify;561;561 +Kanlam;562;562 +Kanlam;563;563 +Bytecard;564;564 +Flexidy;565;565 +Stronghold;566;566 +Vagram;567;567 +Stringtough;568;568 +Fixflex;569;569 +Zathin;570;570 +Treeflex;571;571 +Stronghold;572;572 +Gembucket;573;573 +Matsoft;574;574 +Ronstring;575;575 +Bigtax;576;576 +Bigtax;577;577 +Andalax;578;578 +Andalax;579;579 +Latlux;580;580 +Solarbreeze;581;581 +Subin;582;582 +Kanlam;583;583 +Treeflex;584;584 +Bytecard;585;585 +Veribet;586;586 +Zoolab;587;587 +Fix San;588;588 +Asoka;589;589 +Lotstring;590;590 +Prodder;591;591 +Tres-Zap;592;592 +Job;593;593 +Subin;594;594 +Gembucket;595;595 +Rank;596;596 +Fixflex;597;597 +Temp;598;598 +Bitwolf;599;599 +Cardify;600;600 +Y-find;601;601 +Daltfresh;602;602 +Rank;603;603 +Bitwolf;604;604 +Bigtax;605;605 +Prodder;606;606 +Home Ing;607;607 +Latlux;608;608 +Keylex;609;609 +Stringtough;610;610 +Regrant;611;611 +Latlux;612;612 +Asoka;613;613 +Keylex;614;614 +Sonsing;615;615 +Treeflex;616;616 +Ventosanzap;617;617 +Matsoft;618;618 +Voltsillam;619;619 +Konklux;620;620 +Gembucket;621;621 +Kanlam;622;622 +Fintone;623;623 +Asoka;624;624 +Tresom;625;625 +Andalax;626;626 +Cookley;627;627 +Sub-Ex;628;628 +Namfix;629;629 +Fix San;630;630 +Mat Lam Tam;631;631 +Toughjoyfax;632;632 +Toughjoyfax;633;633 +Gembucket;634;634 +Duobam;635;635 +Fix San;636;636 +Pannier;637;637 +Bigtax;638;638 +Cardguard;639;639 +Gembucket;640;640 +Lotstring;641;641 +Daltfresh;642;642 +Regrant;643;643 +Biodex;644;644 +Andalax;645;645 +Solarbreeze;646;646 +Redhold;647;647 +Treeflex;648;648 +Temp;649;649 +Bitwolf;650;650 +Transcof;651;651 +Subin;652;652 +Zamit;653;653 +Wrapsafe;654;654 +Sub-Ex;655;655 +Matsoft;656;656 +Bytecard;657;657 +Fintone;658;658 +Sonsing;659;659 +Viva;660;660 +Hatity;661;661 +Rank;662;662 +Home Ing;663;663 +Wrapsafe;664;664 +Zamit;665;665 +Domainer;666;666 +Keylex;667;667 +Stronghold;668;668 +Toughjoyfax;669;669 +Wrapsafe;670;670 +Pannier;671;671 +Asoka;672;672 +Tres-Zap;673;673 +Zamit;674;674 +Bigtax;675;675 +Solarbreeze;676;676 +Opela;677;677 +Stim;678;678 +Voyatouch;679;679 +Matsoft;680;680 +Redhold;681;681 +Trippledex;682;682 +Lotstring;683;683 +Vagram;684;684 +Tresom;685;685 +Otcom;686;686 +Cardify;687;687 +Hatity;688;688 +Solarbreeze;689;689 +Keylex;690;690 +Biodex;691;691 +Subin;692;692 +Vagram;693;693 +Wrapsafe;694;694 +Transcof;695;695 +Treeflex;696;696 +Bamity;697;697 +Konklux;698;698 +Tres-Zap;699;699 +Toughjoyfax;700;700 +Holdlamis;701;701 +Sub-Ex;702;702 +Alphazap;703;703 +Voltsillam;704;704 +Voltsillam;705;705 +Zontrax;706;706 +Tampflex;707;707 +Y-find;708;708 +Sonair;709;709 +Alphazap;710;710 +Namfix;711;711 +Toughjoyfax;712;712 +Bitwolf;713;713 +Rank;714;714 +Matsoft;715;715 +Lotlux;716;716 +Trippledex;717;717 +Stringtough;718;718 +Wrapsafe;719;719 +Toughjoyfax;720;720 +Temp;721;721 +Home Ing;722;722 +Lotlux;723;723 +Voyatouch;724;724 +Biodex;725;725 +Veribet;726;726 +Tampflex;727;727 +Voyatouch;728;728 +Bamity;729;729 +Regrant;730;730 +Tin;731;731 +Sub-Ex;732;732 +Toughjoyfax;733;733 +Latlux;734;734 +Tempsoft;735;735 +Matsoft;736;736 +Cardguard;737;737 +Alpha;738;738 +Biodex;739;739 +Bigtax;740;740 +Flexidy;741;741 +Alphazap;742;742 +Daltfresh;743;743 +Overhold;744;744 +Home Ing;745;745 +Zoolab;746;746 +Rank;747;747 +Rank;748;748 +Tres-Zap;749;749 +Flexidy;750;750 +Fix San;751;751 +Pannier;752;752 +Ronstring;753;753 +Ventosanzap;754;754 +Fixflex;755;755 +Trippledex;756;756 +Viva;757;757 +Tin;758;758 +Voltsillam;759;759 +Hatity;760;760 +Gembucket;761;761 +Daltfresh;762;762 +Holdlamis;763;763 +Veribet;764;764 +Tin;765;765 +Latlux;766;766 +Latlux;767;767 +Konklab;768;768 +Stringtough;769;769 +Mat Lam Tam;770;770 +Regrant;771;771 +Otcom;772;772 +Andalax;773;773 +Transcof;774;774 +Bitchip;775;775 +Otcom;776;776 +Zathin;777;777 +Pannier;778;778 +Bigtax;779;779 +Flowdesk;780;780 +Hatity;781;781 +Treeflex;782;782 +Vagram;783;783 +Subin;784;784 +Hatity;785;785 +Stronghold;786;786 +Aerified;787;787 +Cardify;788;788 +Zamit;789;789 +Vagram;790;790 +Tres-Zap;791;791 +Rank;792;792 +Stronghold;793;793 +Y-find;794;794 +Tresom;795;795 +Temp;796;796 +Rank;797;797 +Vagram;798;798 +Holdlamis;799;799 +Andalax;800;800 +Otcom;801;801 +Bitchip;802;802 +Konklux;803;803 +Stim;804;804 +Latlux;805;805 +Flowdesk;806;806 +Konklux;807;807 +Tampflex;808;808 +Konklab;809;809 +Voyatouch;810;810 +Stringtough;811;811 +Sonsing;812;812 +Voltsillam;813;813 +Aerified;814;814 +Biodex;815;815 +Tin;816;816 +Zathin;817;817 +Asoka;818;818 +Lotstring;819;819 +Ronstring;820;820 +Regrant;821;821 +Otcom;822;822 +Bamity;823;823 +Sub-Ex;824;824 +Fix San;825;825 +Treeflex;826;826 +Bigtax;827;827 +Hatity;828;828 +Prodder;829;829 +Prodder;830;830 +Gembucket;831;831 +Stringtough;832;832 +Voltsillam;833;833 +Overhold;834;834 +Latlux;835;835 +Aerified;836;836 +Pannier;837;837 +Bitchip;838;838 +Matsoft;839;839 +Bamity;840;840 +Veribet;841;841 +Konklux;842;842 +Bigtax;843;843 +Gembucket;844;844 +Namfix;845;845 +Cardify;846;846 +Fixflex;847;847 +Duobam;848;848 +Prodder;849;849 +Voltsillam;850;850 +Tempsoft;851;851 +Keylex;852;852 +Bytecard;853;853 +Zathin;854;854 +Bytecard;855;855 +Regrant;856;856 +Sonair;857;857 +Mat Lam Tam;858;858 +Temp;859;859 +Zoolab;860;860 +Zaam-Dox;861;861 +Bitchip;862;862 +Treeflex;863;863 +Bamity;864;864 +Alphazap;865;865 +Domainer;866;866 +Toughjoyfax;867;867 +Alphazap;868;868 +Ronstring;869;869 +Kanlam;870;870 +Prodder;871;871 +Trippledex;872;872 +Cardify;873;873 +Namfix;874;874 +Asoka;875;875 +Zontrax;876;876 +Redhold;877;877 +Namfix;878;878 +Duobam;879;879 +Holdlamis;880;880 +Fintone;881;881 +Wrapsafe;882;882 +Holdlamis;883;883 +Konklux;884;884 +Span;885;885 +Zathin;886;886 +Tin;887;887 +Duobam;888;888 +Konklab;889;889 +Namfix;890;890 +Lotlux;891;891 +Y-find;892;892 +Ventosanzap;893;893 +Matsoft;894;894 +Redhold;895;895 +Fixflex;896;896 +Y-Solowarm;897;897 +Otcom;898;898 +Konklab;899;899 +Rank;900;900 +Konklab;901;901 +Daltfresh;902;902 +Pannier;903;903 +Greenlam;904;904 +Lotlux;905;905 +Tres-Zap;906;906 +Asoka;907;907 +Bamity;908;908 +Tampflex;909;909 +Pannier;910;910 +Namfix;911;911 +Aerified;912;912 +Ronstring;913;913 +Veribet;914;914 +Home Ing;915;915 +Hatity;916;916 +Lotlux;917;917 +Voltsillam;918;918 +Vagram;919;919 +Fix San;920;920 +Stringtough;921;921 +Keylex;922;922 +Home Ing;923;923 +Stringtough;924;924 +Bigtax;925;925 +Ronstring;926;926 +Bitwolf;927;927 +Quo Lux;928;928 +Toughjoyfax;929;929 +Lotstring;930;930 +Ventosanzap;931;931 +Tresom;932;932 +Bitwolf;933;933 +Stronghold;934;934 +Transcof;935;935 +Fintone;936;936 +Pannier;937;937 +Fixflex;938;938 +Domainer;939;939 +Ventosanzap;940;940 +Redhold;941;941 +Job;942;942 +Holdlamis;943;943 +Andalax;944;944 +Domainer;945;945 +Domainer;946;946 +Voyatouch;947;947 +Bitwolf;948;948 +Gembucket;949;949 +Zontrax;950;950 +Regrant;951;951 +Konklab;952;952 +Transcof;953;953 +Temp;954;954 +Transcof;955;955 +Holdlamis;956;956 +Home Ing;957;957 +Bigtax;958;958 +Zamit;959;959 +Opela;960;960 +Rank;961;961 +Fixflex;962;962 +Lotlux;963;963 +Home Ing;964;964 +Cardguard;965;965 +Tresom;966;966 +Temp;967;967 +Cookley;968;968 +Zontrax;969;969 +Zamit;970;970 +Gembucket;971;971 +Biodex;972;972 +Solarbreeze;973;973 +Sonsing;974;974 +Bitchip;975;975 +Alphazap;976;976 +Y-find;977;977 +Fintone;978;978 +Alpha;979;979 +Tresom;980;980 +Home Ing;981;981 +Quo Lux;982;982 +Lotlux;983;983 +Bamity;984;984 +Transcof;985;985 +Ventosanzap;986;986 +It;987;987 +Span;988;988 +Wrapsafe;989;989 +Tres-Zap;990;990 +Biodex;991;991 +Trippledex;992;992 +Alphazap;993;993 +Fixflex;994;994 +Zamit;995;995 +Andalax;996;996 +Y-Solowarm;997;997 +Biodex;998;998 +Sonsing;999;999 +Kanlam;1000;1000 diff --git a/B/emails.txt b/B/emails.txt new file mode 100644 index 0000000..437ff72 --- /dev/null +++ b/B/emails.txt @@ -0,0 +1,31 @@ +simple@example.com +very.common@example.com +disposable.style.email.with+symbol@example.com +other.email-with-hyphen@example.com +fully-qualified-domain@example.com +user.name+tag+sorting@example.com +x@example.com +example-indeed@strange-example.com +test/test@test.com +admin@mailserver1 +example@s.example +" "@example.org +"john..doe"@example.org +mailhost!username@example.org +"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com +user%example.com@example.org +user-@example.org +postmaster@[123.123.123.123] +postmaster@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:7334] + + + +Abc.example.com +A@b@c@example.com +a"b(c)d,e:f;gi[j\k]l@example.com +just"not"right@example.com +this is"not\allowed@example.com +this\ still\"not\\allowed@example.com +1234567890123456789012345678901234567890123456789012345678901234+x@example.com +i_like_underscore@but_its_not_allowed_in_this_part.example.com +QA[icon]CHOCOLATE[icon]@test.com \ No newline at end of file diff --git a/B/test_B01.py b/B/test_B01.py new file mode 100644 index 0000000..76594dc --- /dev/null +++ b/B/test_B01.py @@ -0,0 +1,28 @@ +import unittest +import B01 + + +class TestNames(unittest.TestCase): + def test_correct(self): + self.assertEqual(B01.is_name_correct("Nowy York"), True) # add assertion here + + def test_wrong(self): + self.assertEqual(B01.is_name_correct("0123"), False) + + +class TestPhoneNumbers(unittest.TestCase): + def test_correct(self): + self.assertEqual(B01.is_phone_correct("(61) 222-45-56"), True) + + def test_wrong(self): + self.assertEqual(B01.is_phone_correct("124466780"), False) + +class TestZipCode(unittest.TestCase): + def test_correct(self): + self.assertEqual(B01.is_zipcode_correct("11-111"), True) + + def test_wrong(self): + self.assertEqual(B01.is_zipcode_correct("(61) 222-45-56"), False) + +if __name__ == '__main__': + unittest.main() diff --git a/B/test_BO3.py b/B/test_BO3.py new file mode 100644 index 0000000..3ea851a --- /dev/null +++ b/B/test_BO3.py @@ -0,0 +1,50 @@ +import unittest +import BO3 + + +class TestVulgarism(unittest.TestCase): + def test_1(self): + usr_input = 'W ogóle przystojny, zajebisty, kurwa, koleś' + correct = 'W ogóle przystojny, ---, ---, koleś' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + + def test_2(self): + usr_input = 'Jebnąć cię czy się zamkniesz już?' + correct = '--- cię czy się zamkniesz już?' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_3(self): + usr_input = 'Jebać to mało, zajebać trzeba!' + correct = '--- to mało, --- trzeba!' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_4(self): + usr_input = 'Wyjebał się chuj' + correct = '--- się ---' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_5(self): + usr_input = 'Stara kurwa napierdala w telefon, a ja tu browarka sączę' + correct = 'Stara --- --- w telefon, a ja tu browarka sączę' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_6(self): + usr_input = 'Kurwa, jak to, kurwa, usłyszałem, to mnie, kurwa, z zawiasów wypierdoliło' + correct = '---, jak to, ---, usłyszałem, to mnie, ---, z zawiasów ---' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_7(self): + usr_input = 'Ale mówię ci, zajebiście było' + correct = 'Ale mówię ci, --- było' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_8(self): + usr_input = 'A ja się, kurwa, czuję właśnie jak w Dniu świra' + correct = 'A ja się, ---, czuję właśnie jak w Dniu świra' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_9(self): + usr_input = 'Mój wujek ma, kurwa, no ten, kurwa...' + correct = 'Mój wujek ma, ---, no ten, ---...' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + def test_10(self): + usr_input = 'Kurwa, choć nie na temat to dodam, że...' + correct = '---, choć nie na temat to dodam, że...' + self.assertEqual(BO3.replace_vulgarism(usr_input), correct) # add assertion here + + +if __name__ == '__main__': + unittest.main()