diff --git a/app/for_ai/ai_base_history_codes.py b/app/for_ai/ai_base_history_codes.py index 7d6d329..76a1dee 100644 --- a/app/for_ai/ai_base_history_codes.py +++ b/app/for_ai/ai_base_history_codes.py @@ -178,7 +178,7 @@ password=os.getenv('HOST_160_PASS') # host=os.getenv('HOST_113') # password=os.getenv('HOST_113_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/for_ai/ai_json_move_to_index.py b/app/for_ai/ai_json_move_to_index.py index 515a908..e7b4511 100644 --- a/app/for_ai/ai_json_move_to_index.py +++ b/app/for_ai/ai_json_move_to_index.py @@ -336,7 +336,7 @@ password=os.getenv('HOST_113_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/for_ai/codes_import_from_excel.py b/app/for_ai/codes_import_from_excel.py index 1cec266..a86eba1 100644 --- a/app/for_ai/codes_import_from_excel.py +++ b/app/for_ai/codes_import_from_excel.py @@ -718,7 +718,7 @@ if __name__ == "__main__": print('.... codes_import_from_excel ......', host) - path_base_map = "G:/Project2/gateway2_main/repo/_other/" + path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/for_ai/codes_llm_update_to_elastic.py b/app/for_ai/codes_llm_update_to_elastic.py index aaeb343..a2afc02 100644 --- a/app/for_ai/codes_llm_update_to_elastic.py +++ b/app/for_ai/codes_llm_update_to_elastic.py @@ -835,7 +835,7 @@ if __name__ == "__main__": print( "---------------->>>>>>>>>>>>>>>", host ) - path_base_map = "G:/Project2/gateway2_main/repo/_other/" + path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) # extract_codes_diff_llm_tanghih( elastic, "mj_qa_section", "diff_llm_tanghih_2", body={}) diff --git a/app/for_ai/extract_codes_tokens.py b/app/for_ai/extract_codes_tokens.py index dd19ff9..f0b2f11 100644 --- a/app/for_ai/extract_codes_tokens.py +++ b/app/for_ai/extract_codes_tokens.py @@ -373,7 +373,7 @@ def extract_domain_words( # host=os.getenv('HOST_113') # password=os.getenv('HOST_113_PASS') -# path_base_map = "G:/Project2/gateway2_main/repo/_other/" +# path_base_map = "G:/Project2/gateway_php/repo/_other/" # elastic = ElasticHelper(host, password, "elastic", path_base_map) # # positve diff --git a/app/for_ai/extract_json_to_ai.py b/app/for_ai/extract_json_to_ai.py index 0277738..f88f96b 100644 --- a/app/for_ai/extract_json_to_ai.py +++ b/app/for_ai/extract_json_to_ai.py @@ -23,7 +23,7 @@ host=os.getenv('HOST_160') password=os.getenv('HOST_160_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) # elastic.exportToJsonForAI("output","mj_qa_section", "mj_qa_section.json", {}, ["content", "qanon_title", "ts_date", "other_info.full_path"]) @@ -48,12 +48,13 @@ body = { } ] } - }, - { - "term":{ - "ai_code.label":"فناوری اطلاعات و ارتباطات" - } } + # , + # { + # "term":{ + # "ai_code.label":"فناوری اطلاعات و ارتباطات" + # } + # } ] } } @@ -66,7 +67,7 @@ body = { # } # } # } -elastic.exportToJsonForAI("output","mj_qa_section", "section_codes_ertabatat.json", body, ["ai_codes", "ai_code", "content", "qanon_title", "qanon_id", "other_info.full_path"], "normal") +# elastic.exportToJsonForAI("output","mj_qa_section", "section_codes_ai.json", body, ["ai_codes", "ai_code"], "dict") body = { "sort": [ diff --git a/app/for_ai/extract_sections_tokens.py b/app/for_ai/extract_sections_tokens.py index 71d014f..9d0fbca 100644 --- a/app/for_ai/extract_sections_tokens.py +++ b/app/for_ai/extract_sections_tokens.py @@ -167,7 +167,7 @@ password=os.getenv('HOST_160_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/for_ai/llm_excel_codes_import_to_es.py b/app/for_ai/llm_excel_codes_import_to_es.py index 9f2b5b2..07979e2 100644 --- a/app/for_ai/llm_excel_codes_import_to_es.py +++ b/app/for_ai/llm_excel_codes_import_to_es.py @@ -242,7 +242,7 @@ password = os.getenv("HOST_160_PASS") # host=os.getenv('HOST_113') # password=os.getenv('HOST_113_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) #---------------------------------------------------------------- diff --git a/app/for_ai/majles_codes_update_steps.py b/app/for_ai/majles_codes_update_steps.py index 3904e1d..68c7ab4 100644 --- a/app/for_ai/majles_codes_update_steps.py +++ b/app/for_ai/majles_codes_update_steps.py @@ -30,7 +30,7 @@ password=os.getenv('HOST_113_PASS') print('.... majles_codes_update_steps ......', host) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) #------------------------------------------------ diff --git a/app/for_ai/plans_import.py b/app/for_ai/plans_import.py index 9d716db..a2c78b1 100644 --- a/app/for_ai/plans_import.py +++ b/app/for_ai/plans_import.py @@ -176,7 +176,7 @@ if __name__ == "__main__": print('.... codes_import_from_excel ......', host) - path_base_map = "G:/Project2/gateway2_main/repo/_other/" + path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/import_elastic_async.py b/app/import_elastic_async.py index 35617b3..d18a0a9 100644 --- a/app/import_elastic_async.py +++ b/app/import_elastic_async.py @@ -38,7 +38,7 @@ current_directory = os.getcwd() data_t_location = current_directory + "\\data\\" default_location_data= current_directory + "\\data" -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elasticImport = elastic_helper_async(host, password, "elastic", path_base_map) name_zip_file = "data_back040615.zip" diff --git a/app/import_from_sql/all_elastic_steps.py b/app/import_from_sql/all_elastic_steps.py index 0f0718b..095b2df 100644 --- a/app/import_from_sql/all_elastic_steps.py +++ b/app/import_from_sql/all_elastic_steps.py @@ -25,7 +25,7 @@ password=os.getenv('HOST_160_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) ## 0 ##-------------------------------------------------- diff --git a/app/import_from_sql/s12_LawSection_repair_ref_state.py b/app/import_from_sql/s12_LawSection_repair_ref_state.py index 1cbfadd..6e0856d 100644 --- a/app/import_from_sql/s12_LawSection_repair_ref_state.py +++ b/app/import_from_sql/s12_LawSection_repair_ref_state.py @@ -197,7 +197,7 @@ password=os.getenv('HOST_160_PASS') # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/repair_data/import_sysnoym.py b/app/repair_data/import_sysnoym.py index af73e28..5d64216 100644 --- a/app/repair_data/import_sysnoym.py +++ b/app/repair_data/import_sysnoym.py @@ -18,7 +18,7 @@ password=os.getenv('HOST_160_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/repair_data/r1_LawSection_repair1.py b/app/repair_data/r1_LawSection_repair1.py index ca64701..8571fc7 100644 --- a/app/repair_data/r1_LawSection_repair1.py +++ b/app/repair_data/r1_LawSection_repair1.py @@ -555,7 +555,7 @@ load_dotenv(dotenv_path='config.env') host=os.getenv('HOST_160') password=os.getenv('HOST_160_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) cursor, cnxn = create_cursor() diff --git a/app/repair_data/r2_model_repair.py b/app/repair_data/r2_model_repair.py index 6549a43..3dee178 100644 --- a/app/repair_data/r2_model_repair.py +++ b/app/repair_data/r2_model_repair.py @@ -97,7 +97,7 @@ host=os.getenv('HOST_112') password=os.getenv('HOST_112_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/repair_data/r6_before_excel.py b/app/repair_data/r6_before_excel.py index 8ebe659..df7262a 100644 --- a/app/repair_data/r6_before_excel.py +++ b/app/repair_data/r6_before_excel.py @@ -514,7 +514,7 @@ password=os.getenv('HOST_113_PASS') print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) # --------------------------------------------------------- diff --git a/app/repair_data/r7_doc_state_update.py b/app/repair_data/r7_doc_state_update.py index 71ad830..f9d9855 100644 --- a/app/repair_data/r7_doc_state_update.py +++ b/app/repair_data/r7_doc_state_update.py @@ -152,7 +152,7 @@ load_dotenv(dotenv_path='config.env') host=os.getenv('HOST_160') password=os.getenv('HOST_160_PASS') -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/repair_data/repair_log_search_action.py b/app/repair_data/repair_log_search_action.py index 32a7b7e..dc442c7 100644 --- a/app/repair_data/repair_log_search_action.py +++ b/app/repair_data/repair_log_search_action.py @@ -26,7 +26,7 @@ password=os.getenv('HOST_160_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) diff --git a/app/temp_codes.py b/app/temp_codes.py index cd9b87a..a179d6f 100644 --- a/app/temp_codes.py +++ b/app/temp_codes.py @@ -19,8 +19,8 @@ load_dotenv(dotenv_path="config.env") # host = os.getenv("HOST_160") # password = os.getenv("HOST_160_PASS") -# host=os.getenv('HOST_112') -# password=os.getenv('HOST_112_PASS') +host=os.getenv('HOST_112') +password=os.getenv('HOST_112_PASS') # host=os.getenv('HOST_113') # password=os.getenv('HOST_113_PASS') @@ -37,19 +37,28 @@ load_dotenv(dotenv_path="config.env") # host=os.getenv('HOST_80') # password=os.getenv('HOST_80_PASS') -host=os.getenv('HOST_133') -password=os.getenv('HOST_133_PASS') +# host=os.getenv('HOST_133') +# password=os.getenv('HOST_133_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map) # elastic.removeCustomFileds("mj_qa_section", ["tcode","nlp_parser","content_normal","tcode_mains","tcode_subs", "ners_v1", "level", "code-ai"]) +# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section-m1") +# elastic.createIndex( index_name='mj_qa_section-m1', app_key='majles', map_name='mj_qa_section') +# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section-m1.zip', 'mj_qa_section-m1', 'majles', False, 'mj_qa_section') +elastic.restorFileToElastic2(path_file='G:/Project2/111/server112/mj_qa_section-m1.zip', index_name='mj_qa_section-m1', app_key='majles', queryDelete=False, map_name='mj_qa_section') + +# elastic.backupIndexToZipfile("G:/Project2/111", "mj_plan") +# elastic.createIndex( 'mj_plan', 'majles', 'mj_plan') +# elastic.restorFileToElastic2('G:/Project2/111/mj_plan.zip', 'mj_plan', 'majles', False, 'mj_plan') + # elastic.backupIndexToZipfile("G:/Project2/111", "mj_mashruh") # elastic.backupIndexToZipfile("G:/Project2/113", "mj_qa_section") # elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section.zip', 'mj_qa_section', 'majles', False, 'mj_qa_section') @@ -65,9 +74,6 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map) # elastic.restorFileToElastic2('G:/Project2/111/mj_qa_domain.zip', 'mj_qa_domain', 'majles', False, 'mj_qa_domain') -# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section-m1") -# elastic.createIndex( 'mj_qa_section-m1', 'majles', 'mj_qa_section') -# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section-m1.zip', 'mj_qa_section-m1', 'majles', False, 'mj_qa_section') # elastic.backupIndexToZipfile("G:/Project2/111", "gn_calendar") # elastic.createIndex( 'gn_calendar', 'general', 'gn_calendar') diff --git a/run_env.bash b/run_env.bash index 70321d9..6b48852 100644 --- a/run_env.bash +++ b/run_env.bash @@ -2,5 +2,7 @@ source config.env #virtualenv .venv source .venv/bin/activate +# windows : /// .env\Scripts\activate + #pip install -r requirements.txt #uvicorn app.main:app --host=0.0.0.0 --port=8010 --reload \ No newline at end of file diff --git a/temps/import_prev_qanon_info.py b/temps/import_prev_qanon_info.py index 8cb9275..93b194f 100644 --- a/temps/import_prev_qanon_info.py +++ b/temps/import_prev_qanon_info.py @@ -17,7 +17,7 @@ password=os.getenv('HOST_160_PASS') print(host) # print(password) -path_base_map = "G:/Project2/gateway2_main/repo/_other/" +path_base_map = "G:/Project2/gateway_php/repo/_other/" elastic = ElasticHelper(host, password, "elastic", path_base_map)