RECURRENT DONATION
Donate monthly to support
the NeculaiFantanaru.com project
एक ही डोमेन में बाजार पर अन्य की तुलना में इस पुस्तक की आवश्यक विशेषता यह है कि यह उदाहरणों के माध्यम से एक नेता की आदर्श क्षमता का वर्णन करती है। मैंने कभी यह दावा नहीं किया कि एक अच्छा नेता बनना आसान है, लेकिन अगर लोग करेंगे तो...
मैंने यह पुस्तक लिखी है जो एक सरल तरीके से व्यक्तिगत विकास को नेतृत्व के साथ जोड़ती है, बिल्कुल एक पहेली की तरह, जहाँ आपको सामान्य छवि को फिर से बनाने के लिए दिए गए सभी टुकड़ों का मिलान करना होता है।
इस पुस्तक का उद्देश्य आपको ठोस उदाहरणों के माध्यम से जानकारी प्रदान करना है और आपको यह दिखाना है कि दूसरों को चीजों को आपके समान कोण से देखने की क्षमता कैसे प्राप्त करें।
आप यहां पूरा कोड देख सकते हैं:Https: // passatin.com / 2 i पु wb2 नलसाजपायथन। एक फ़ोल्डर बनाओ: files_ppartite(आकार की फाइलें यहां संग्रहीत की जाएंगी) कोड: import sys import os import nltk from nltk import tokenize 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 imparte_fisiere(cale_fisier_txt, cale_folder_fisiere_impartite): text = read_text_from_file(cale_fisier_txt) propozitii = tokenize.sent_tokenize(text) nume_fisier = os.path.basename(cale_fisier_txt).split('.')[0] # "30.txt" => split('.') => ["30", "txt"] => [0] => "30" chunk = '' chunk_size = 5000 # 5KB chunk_number = 1 for propozitie in propozitii: if len(chunk.encode('utf-8')) < chunk_size: chunk = chunk + " " + propozitie else: # scriere fisier cale_fisier_rezultat = cale_folder_fisiere_impartite + '\\' + nume_fisier + "_" + str(chunk_number) + ".txt" # => "30_1.txt" write_to_file(chunk, cale_fisier_rezultat) # print("Fisierul {} a fost scris cu succes.".format(nume_fisier + "_" + str(chunk_number) + ".txt")) chunk = propozitie chunk_number += 1 def creare_fisiere(cale_folder_txt, cale_folder_fisiere_impartite): """ Functia itereaza printr-un folder care contine fisiere txt si imparte in 5KB fiecare fisier """ count = 0 for f in os.listdir(cale_folder_txt): if f.endswith('txt'): cale_fisier_txt = cale_folder_txt + "\\" + f imparte_fisiere(cale_fisier_txt, cale_folder_fisiere_impartite) count += 1 else: continue print("Numarul de fisiere modificate: ", count) # cale_folder_txt/30.txt => cale_folder_fisiere_impartite/30_part1.txt # => cale_folder_fisiere_impartite/30_part2.txt def main(): creare_fisiere("c:\\Folder1", "c:\\Folder1\\fisiere_impartite") if __name__ == '__main__': main() That's all folks. इसके अलावा, यह देखेंसंस्करण 2या संस्करण 3यासंस्करण 4यासंस्करण 5यासंस्करण 6यासंस्करण 7 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
|
||||||||||||
![]() |
||||||||||||