/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_iranian_national_code(code): | |
code_len = len(code) | |
if code_len > 10 or code_len < 8: | |
return False | |
if len(set(code)) == 1: | |
return False | |
if len(code) < 10: | |
code = code.zfill(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$states = [ | |
'ABZ' => 'البرز', | |
'ADL' => 'اردبیل', | |
'EAZ' => 'آذربایجان شرقی', | |
'WAZ' => 'آذربایجان غربی', | |
'BHR' => 'بوشهر', | |
'CHB' => 'چهارمحال و بختیاری', | |
'FRS' => 'فارس', | |
'GIL' => 'گیلان', | |
'GLS' => 'گلستان', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import pytesseract | |
import re | |
def extract_name_from_id_card(image): | |
try: | |
image = Image.open(image) | |
ocr_text = pytesseract.image_to_string(image).lower().replace(" ", "") | |
name_pattern = re.compile(r"p<([^<]+)<<([^<]+)<") | |
matches = name_pattern.findall(ocr_text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url : http://natas0.natas.labs.overthewire.org | |
username : natas0 | |
password : natas0 | |
url : http://natas1.natas.labs.overthewire.org | |
username : natas1 | |
password : gtVrDuiDfck831PqWsLEZy5gyDz1clto | |
url : http://natas2.natas.labs.overthewire.org | |
username : natas2 |