speechtotext works

This commit is contained in:
2022-09-30 21:05:06 +02:00
parent a5c4902d9d
commit 78fcf10217
5 changed files with 19 additions and 18 deletions
+3 -1
View File
@@ -7,10 +7,12 @@ else
fi fi
if [[ "$OSTYPE" == "msys" ]] if [[ "$OSTYPE" == "msys" ]]
then then
./venv/Scripts/pyarmor.exe obfuscate --recursive --output $dest_dir/src src/__init__.py ./venv/Scripts/pyarmor.exe obfuscate --recursive --output $dest_dir/src src/__init__.py
else else
echo "will obfuscate the source code"
pyarmor obfuscate --recursive --output $dest_dir/src src/__init__.py pyarmor obfuscate --recursive --output $dest_dir/src src/__init__.py
fi fi
cp main.py $dest_dir cp main.py $dest_dir
cp appointment.py $dest_dir cp appointment.py $dest_dir
cp requirements.txt $dest_dir cp requirements.txt $dest_dir
cp server.py $dest_dir
-3
View File
@@ -10,12 +10,9 @@ wget==3.2.0
pocketsphinx==0.1.15 pocketsphinx==0.1.15
oci~=2.54.1 oci~=2.54.1
XlsxWriter~=3.0.3 XlsxWriter~=3.0.3
playwright-stealth==1.0.5
boto3~=1.21.13 boto3~=1.21.13
openpyxl==3.0.9 openpyxl==3.0.9
google-cloud-firestore==2.4.0 google-cloud-firestore==2.4.0
PySimpleGUI==4.60.1 PySimpleGUI==4.60.1
SQLAlchemy~=1.4.37
requests~=2.27.1 requests~=2.27.1
sqlalchemy_utils~=0.38.2
Mako~=1.2.0 Mako~=1.2.0
+4 -3
View File
@@ -145,7 +145,8 @@ def need_to_valid_url(url: str, successful_items) -> bool:
def need_to_check_email(mail: str, successful_items) -> bool: def need_to_check_email(mail: str, successful_items) -> bool:
# return True return True
print("successful_items size is " + str(len(successful_items)))
for item in successful_items: for item in successful_items:
if mail in item.email: if mail in item.email:
if item.url_validated is not None: if item.url_validated is not None:
@@ -181,7 +182,7 @@ def read_mails():
mail_reader = MailReader(mail.mail, mail.password) mail_reader = MailReader(mail.mail, mail.password)
executor.submit(mail_reader.read_emails, mails_messages) executor.submit(mail_reader.read_emails, mails_messages)
with ThreadPoolExecutor(max_workers=5) as executor: with ThreadPoolExecutor(max_workers=8) as executor:
for mail in mails_messages: for mail in mails_messages:
match = re.search(VALIDATION_URL_REGEX, mail.body) match = re.search(VALIDATION_URL_REGEX, mail.body)
if match: if match:
@@ -189,7 +190,7 @@ def read_mails():
if need_to_valid_url(url, successful_items): if need_to_valid_url(url, successful_items):
url_validator = LinkValidator(url) url_validator = LinkValidator(url)
print("need to validate url: " + url) print("need to validate url: " + url)
executor.submit(url_validator.start_page, params.get_proxy(ProxyType.RESIDENTIAL), True) executor.submit(url_validator.start_page, params.get_proxy(ProxyType.RESIDENTIAL), False)
else: else:
print("do not need to click url --> {}".format(mail.mail_address)) print("do not need to click url --> {}".format(mail.mail_address))
+5 -5
View File
@@ -212,12 +212,12 @@ def save_mails_to_db():
if __name__ == '__main__': if __name__ == '__main__':
excel_reader = ExcelHelper() # excel_reader = ExcelHelper()
contacts = excel_reader.read_names("/Users/lpan/Documents/rdv/随机/22-09-2022/随机10.xlsx") # contacts = excel_reader.read_names("/Users/lpan/Documents/rdv/随机/28-09-2022/随机.xlsx")
print(contacts) # print(contacts)
write_new_contacts_to_excel(valid_contacts=contacts) # write_new_contacts_to_excel(valid_contacts=contacts)
# save_mails_to_db() save_mails_to_db()
# for mail in excel_reader.read_mails_and_pwd(): # for mail in excel_reader.read_mails_and_pwd():
# MONGO_STORE_MANAGER.insert_email(mail) # MONGO_STORE_MANAGER.insert_email(mail)
# for i in range(1, 64): # for i in range(1, 64):
+4 -3
View File
@@ -6,7 +6,8 @@ import string
from src.pojo.captcha_error_contact_pojo import ContactInErrorPojo from src.pojo.captcha_error_contact_pojo import ContactInErrorPojo
from src.pojo.contact_pojo import ContactPojo from src.pojo.contact_pojo import ContactPojo
letters = ['E', 'G', 'M'] # letters = ['E', 'G', 'M']
letters = ['E']
prefix_tire_de_sejour = "9918" prefix_tire_de_sejour = "9918"
@@ -55,7 +56,7 @@ def generate_titre_sejour_number(size=10) -> list:
if __name__ == '__main__': if __name__ == '__main__':
# for i in range(1,200): # for i in range(1,200):
# print(get_random_id_number()) # print(get_random_id_number())
# for i in range(1, 804): # for i in range(1, 501):
# print(get_random_id_number()) # print(get_random_passport_id_number())
for id in generate_titre_sejour_number(500): for id in generate_titre_sejour_number(500):
print(id) print(id)