RECURRENT DONATION
Donate monthly to support
the NeculaiFantanaru.com project
एक ही डोमेन में बाजार पर अन्य की तुलना में इस पुस्तक की आवश्यक विशेषता यह है कि यह उदाहरणों के माध्यम से एक नेता की आदर्श क्षमता का वर्णन करती है। मैंने कभी यह दावा नहीं किया कि एक अच्छा नेता बनना आसान है, लेकिन अगर लोग करेंगे तो...
मैंने यह पुस्तक लिखी है जो एक सरल तरीके से व्यक्तिगत विकास को नेतृत्व के साथ जोड़ती है, बिल्कुल एक पहेली की तरह, जहाँ आपको सामान्य छवि को फिर से बनाने के लिए दिए गए सभी टुकड़ों का मिलान करना होता है।
इस पुस्तक का उद्देश्य आपको ठोस उदाहरणों के माध्यम से जानकारी प्रदान करना है और आपको यह दिखाना है कि दूसरों को चीजों को आपके समान कोण से देखने की क्षमता कैसे प्राप्त करें।
आप यहां पूरा कोड देख सकते हैं:Https: // passatin.com / pk42 wg इंस्टॉलपायथन। नीचे कोड क्या करता है? प्रत्येक HTML फ़ाइल में मेरे पास एक PHP अनुक्रम है जिसमें इस चर है$ item_id = संख्या; संख्या1 से 1600 (या आप जिस संख्या को आप चाहते हैं) की सीमा के बराबर है, उदाहरण के लिए एक फ़ाइल में हो सकता है$ ITEM_ID =HTML HILITE.ME का उपयोग करके उत्पन्नतेईस;और अन्य फ़ाइल में मेरे पास हो सकता है$ item_id = 1340;और इसी तरह.. मैं उन फ़ाइलों को ढूंढना चाहता हूं जिनमें दोहराए गए स्ट्रिंग में संख्याएं होती हैं। उदाहरण के लिए मेरे पास हो सकता है$ ITEM_ID =HTML HILITE.ME का उपयोग करके उत्पन्नतेईस;n एक फ़ाइल और समान हो सकता है$ ITEM_ID =HTML HILITE.ME का उपयोग करके उत्पन्नतेईस;अन्य फ़ाइल में। पायथन कोड में सहेजेगापरिणाम_ duplicates.txtसभी फ़ाइल नाम जिनमें इस प्रकार के डुप्लिकेट होते हैं। कोडुल: किसी भी दुभाषिया कार्यक्रम में नीचे दिए गए कोड को कॉपी और चलाएं (मैं उपयोग करता हूं Pyscrcs। कोड: import os import re def read_text_from_file(file_path): """ Aceasta functie returneaza continutul unui fisier. file_path: calea catre fisierul din care vrei sa citesti """ with open(file_path, encoding='utf8') as f: text = f.read() return text def write_to_file(text, file_path): """ Aceasta functie scrie un text intr-un fisier. text: textul pe care vrei sa il scrii file_path: calea catre fisierul in care vrei sa scrii """ with open(file_path, 'wb') as f: f.write(text.encode('utf8', 'ignore')) def get_duplicates(directory_path, results_file): duplicates = dict() fisiere_care_nu_au_id = '' fisiere_duplicat = '' id_pattern = re.compile('\$item_id = (.*?);') for f in os.listdir(directory_path): if f.endswith('.html') and f != 'termeni-si-conditii.html' and f != "parteneri.html": filepath = directory_path + '//' + f file_text = read_text_from_file(filepath) number = re.findall(id_pattern, file_text) if len(number) != 0: number = number[0] number = number.strip() if number in duplicates.keys(): duplicates[number].append(f) # duplicates[number].append(f) else: duplicates[number] = [f] else: fisiere_care_nu_au_id = fisiere_care_nu_au_id + f + '\n' for key in duplicates.keys(): if len(duplicates[key]) >= 2: print(key) for f in duplicates[key]: fisiere_duplicat = fisiere_duplicat + f + '\n' fisiere_duplicat += '\n\n' result = "FISIERE CARE NU AU ID \n\n" + fisiere_care_nu_au_id + '\n' + "FISIERE DUPLICAT \n\n" + fisiere_duplicat write_to_file(result, results_file) print("Scriere efectuata cu succes.") if __name__ == '__main__': directory_path = "e:\\Carte\\BB\\17 - Site Leadership\\Principal\\ro" results_file = "e:\\Carte\\BB\\17 - Site Leadership\\Principal\\ro\\results_duplicates.txt" get_duplicates(directory_path, results_file) That's all folks. If you like my code, then make me a favor: translate your website into Romanian, "ro". इसके अलावा, एक हैसंस्करण 2इस कोड यासंस्करण 3यासंस्करण 4यासंस्करण 5
Latest articles accessed by readers:
Donate via Paypal
RECURRENT DONATIONDonate monthly to support SINGLE DONATIONDonate the desired amount to support Donate by Bank TransferAccount Ron: RO34INGB0000999900448439
Open account at ING Bank
|
||||||||||||
![]() |
||||||||||||