codes
This commit is contained in:
@@ -178,7 +178,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
# host=os.getenv('HOST_113')
|
# host=os.getenv('HOST_113')
|
||||||
# password=os.getenv('HOST_113_PASS')
|
# 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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ password=os.getenv('HOST_113_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
print('.... codes_import_from_excel ......', host)
|
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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -835,7 +835,7 @@ if __name__ == "__main__":
|
|||||||
print( "---------------->>>>>>>>>>>>>>>", host )
|
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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
# extract_codes_diff_llm_tanghih( elastic, "mj_qa_section", "diff_llm_tanghih_2", body={})
|
# extract_codes_diff_llm_tanghih( elastic, "mj_qa_section", "diff_llm_tanghih_2", body={})
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ def extract_domain_words(
|
|||||||
# host=os.getenv('HOST_113')
|
# host=os.getenv('HOST_113')
|
||||||
# password=os.getenv('HOST_113_PASS')
|
# 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)
|
# elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
# # positve
|
# # positve
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ host=os.getenv('HOST_160')
|
|||||||
password=os.getenv('HOST_160_PASS')
|
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 = 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"])
|
# 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 = {
|
body = {
|
||||||
"sort": [
|
"sort": [
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ password = os.getenv("HOST_160_PASS")
|
|||||||
# host=os.getenv('HOST_113')
|
# host=os.getenv('HOST_113')
|
||||||
# password=os.getenv('HOST_113_PASS')
|
# 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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ password=os.getenv('HOST_113_PASS')
|
|||||||
|
|
||||||
print('.... majles_codes_update_steps ......', host)
|
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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
#------------------------------------------------
|
#------------------------------------------------
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
print('.... codes_import_from_excel ......', host)
|
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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ current_directory = os.getcwd()
|
|||||||
data_t_location = current_directory + "\\data\\"
|
data_t_location = current_directory + "\\data\\"
|
||||||
default_location_data= 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)
|
elasticImport = elastic_helper_async(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
name_zip_file = "data_back040615.zip"
|
name_zip_file = "data_back040615.zip"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
## 0 ##--------------------------------------------------
|
## 0 ##--------------------------------------------------
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
|
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ load_dotenv(dotenv_path='config.env')
|
|||||||
host=os.getenv('HOST_160')
|
host=os.getenv('HOST_160')
|
||||||
password=os.getenv('HOST_160_PASS')
|
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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
cursor, cnxn = create_cursor()
|
cursor, cnxn = create_cursor()
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ host=os.getenv('HOST_112')
|
|||||||
password=os.getenv('HOST_112_PASS')
|
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)
|
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ password=os.getenv('HOST_113_PASS')
|
|||||||
|
|
||||||
print(password)
|
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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ load_dotenv(dotenv_path='config.env')
|
|||||||
host=os.getenv('HOST_160')
|
host=os.getenv('HOST_160')
|
||||||
password=os.getenv('HOST_160_PASS')
|
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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-8
@@ -19,8 +19,8 @@ load_dotenv(dotenv_path="config.env")
|
|||||||
# host = os.getenv("HOST_160")
|
# host = os.getenv("HOST_160")
|
||||||
# password = os.getenv("HOST_160_PASS")
|
# password = os.getenv("HOST_160_PASS")
|
||||||
|
|
||||||
# host=os.getenv('HOST_112')
|
host=os.getenv('HOST_112')
|
||||||
# password=os.getenv('HOST_112_PASS')
|
password=os.getenv('HOST_112_PASS')
|
||||||
|
|
||||||
# host=os.getenv('HOST_113')
|
# host=os.getenv('HOST_113')
|
||||||
# password=os.getenv('HOST_113_PASS')
|
# password=os.getenv('HOST_113_PASS')
|
||||||
@@ -37,19 +37,28 @@ load_dotenv(dotenv_path="config.env")
|
|||||||
# host=os.getenv('HOST_80')
|
# host=os.getenv('HOST_80')
|
||||||
# password=os.getenv('HOST_80_PASS')
|
# password=os.getenv('HOST_80_PASS')
|
||||||
|
|
||||||
host=os.getenv('HOST_133')
|
# host=os.getenv('HOST_133')
|
||||||
password=os.getenv('HOST_133_PASS')
|
# password=os.getenv('HOST_133_PASS')
|
||||||
|
|
||||||
|
|
||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = 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.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/111", "mj_mashruh")
|
||||||
# elastic.backupIndexToZipfile("G:/Project2/113", "mj_qa_section")
|
# 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')
|
# 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.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.backupIndexToZipfile("G:/Project2/111", "gn_calendar")
|
||||||
# elastic.createIndex( 'gn_calendar', 'general', 'gn_calendar')
|
# elastic.createIndex( 'gn_calendar', 'general', 'gn_calendar')
|
||||||
|
|||||||
@@ -2,5 +2,7 @@ source config.env
|
|||||||
#virtualenv .venv
|
#virtualenv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# windows : /// .env\Scripts\activate
|
||||||
|
|
||||||
#pip install -r requirements.txt
|
#pip install -r requirements.txt
|
||||||
#uvicorn app.main:app --host=0.0.0.0 --port=8010 --reload
|
#uvicorn app.main:app --host=0.0.0.0 --port=8010 --reload
|
||||||
@@ -17,7 +17,7 @@ password=os.getenv('HOST_160_PASS')
|
|||||||
print(host)
|
print(host)
|
||||||
# print(password)
|
# 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 = ElasticHelper(host, password, "elastic", path_base_map)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user