{"id":390547,"date":"2024-06-29T09:18:37","date_gmt":"2024-06-29T09:18:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=390547"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=390547","title":{"rendered":"<span>\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f Python \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 #1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0423 Python \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438. \u042d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043b\u044e\u0431\u044f\u0442 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443, \u043b\u043e\u044f\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0430 \u0435\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a numpy, django, flask, pygame, tornado, tensorflow \u0438 \u0434\u0440\u0443\u0433\u0438\u0445. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 pypi \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 320 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0442 \u043c\u0430\u043b\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0438 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0434\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u043b\u044e\u0434\u0435\u0439 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445.\u00a0<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0432 \u0442\u0430\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u0443\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/mutagen\/\" rel=\"noopener noreferrer nofollow\">mutagen<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/in-place\/\" rel=\"noopener noreferrer nofollow\">in_place<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/pyarmor\/\" rel=\"noopener noreferrer nofollow\">pyarmor<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/pyspellchecker\/\" rel=\"noopener noreferrer nofollow\">pyspellchecker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/mimesis\/\" rel=\"noopener noreferrer nofollow\">mimesis<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>mutagen<\/h2>\n<p>\u2b50 github: 849<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0432\u0441\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u0438\u043d\u0443, \u0431\u0438\u0442\u0440\u0435\u0439\u0442, \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0433\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c mutagen \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>pip install mutagen<\/code>. Mutagen \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 ID3v2, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0444\u0440\u0435\u0439\u043c\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0435\u0439 ID3v2.4 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e RVA2 \u0438 POPM, \u0441\u043c. \u0442\u0435\u0433\u0438 ID3v2 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"http:\/\/www.bog.pp.ru\/dw\/tags.html\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>), \u0438 \u0444\u043e\u0440\u043c\u0430\u0442 APEv2 \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API \u0438 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0433\u043e\u0432. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u0443\u0434\u0438\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import mutagen  # \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0430\u043c \u0444\u0430\u0439\u043b mfile = mutagen.File(\"E:\/Reamon-Super Girl.mp3\")  # \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e print(mfile.info.pprint()) >>> MPEG 1 layer 3, 160000 bps (CBR?), 44100 Hz, 2 chn, 243.83 seconds print(\"\u0414\u043b\u0438\u043d\u0430 \u0430\u0443\u0434\u0438\u043e (\u0441\u0435\u043a):\", mfile.info.length) print(\"\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438:\", mfile.info.sample_rate) print(\"\u0411\u0438\u0442\u0440\u0435\u0439\u0442:\", mfile.info.bitrate) print(\"\u041a\u0430\u043d\u0430\u043b\u043e\u0432:\", mfile.info.channels) >>> \u0414\u043b\u0438\u043d\u0430 \u0430\u0443\u0434\u0438\u043e (\u0441\u0435\u043a): 243.83335 >>> \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438: 44100 >>> \u0411\u0438\u0442\u0440\u0435\u0439\u0442: 160000 >>> \u041a\u0430\u043d\u0430\u043b\u043e\u0432: 2<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0435\u0433\u0430\u043c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from mutagen.id3 import ID3  audio = ID3(\"E:\/Reamon-Super Girl.mp3\")  print(\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:\", audio.get(\"TIT2\")) print(\"\u0422\u0438\u043f \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f:\", audio.get(\"TMED\")) print(\"\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c:\", audio.get(\"TPE1\")) >>> \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: Super Girl >>> \u0422\u0438\u043f \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f: DIG >>> \u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c: Reamon  # \u043e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f print(audio.pprint()) >>> TIT2=Super Girl TMED=DIG TPE1=Reamon # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 audio.delete() audio.save() print(audio.pprint() == \"\") >>> True<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a mutagen \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u0443\u0434\u0438\u043e \u0432 \u0443\u0434\u043e\u0431\u043d\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<h2>in_place<\/h2>\n<p>\u2b50 github: 20<\/p>\n<p>\u0411\u044b\u0432\u0430\u044e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0430\u0439\u043b. \u0412 \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441 2\u043c\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041c\u043e\u0434\u0443\u043b\u044c in_place \u0431\u0435\u0440\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0441\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c: <code>pip install in_place<\/code><\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0446\u0438\u0444\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043c \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f, \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0444\u0430\u0439\u043b:  <\/p>\n<pre><code class=\"python\">import in_place with in_place.InPlace('tmp.txt', encoding=\"utf-8\") as fp:     for line in fp:         words = []         for word in line.split():             for char in \"1234567890\":                 word = word.replace(char, \"\")             words.append(word)         fp.write(\" \".join(words) + \"\\n\")<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9fa\/b7e\/c4f\/9fab7ec4f8d35f4fc2f018c34350b31d.png\" alt=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0433\u0440\u044f\u0437\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c\" title=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0433\u0440\u044f\u0437\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c\" width=\"449\" height=\"173\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9fa\/b7e\/c4f\/9fab7ec4f8d35f4fc2f018c34350b31d.png\"\/><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0433\u0440\u044f\u0437\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bea\/8e3\/ac0\/bea8e3ac0f2600f2de01f4edbf4705b8.png\" alt=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c\" title=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c\" width=\"263\" height=\"152\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bea\/8e3\/ac0\/bea8e3ac0f2600f2de01f4edbf4705b8.png\"\/><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>with in_place.InPlace('tmp.txt', encoding=\"utf-8\") as fp:<\/code> \u043d\u0430 <code>with in_place.InPlace('tmp.txt', encoding=\"utf-8\", backup=\u201dtmp_old.txt\u201d) as fp:<\/code>, \u0442\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c tmp_old.txt<\/p>\n<pre><code class=\"python\">with in_place.InPlace('tmp.txt', encoding=\"utf-8\", backup=\"tmp_old.txt\") as fp:     for line in fp:         words = []         for word in line.split():             for char in \"1234567890\":                 word = word.replace(char, \"\")             words.append(word)         fp.write(\" \".join(words) + \"\\n\")<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/399\/df0\/fdc\/399df0fdcc8fd52f5990e3b71370a3f0.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u044d\u043a\u0430\u043f\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u044d\u043a\u0430\u043f\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\" width=\"512\" height=\"182\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/399\/df0\/fdc\/399df0fdcc8fd52f5990e3b71370a3f0.png\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u044d\u043a\u0430\u043f\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u043b\u0430\u0441\u0441 InPlace \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>mode=&lt;&#8216;b&#8217;|&#8217;t&#8217;|None> &#8212; \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430, \u2018b\u2019 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439, \u2018t\u2019\/None &#8212; \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439<\/p>\n<\/li>\n<li>\n<p>backup=&lt;PATH> &#8212; \u043f\u0443\u0442\u044c \u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0443 \u0444\u0430\u0439\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>backup_ext=&lt;EXTENSION> &#8212; \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0431\u044d\u043a\u0430\u043f \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 + backup_ext<\/p>\n<\/li>\n<li>\n<p>move_first=&lt;BOOL> &#8212; \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h2>pyarmor<\/h2>\n<p>\u2b50 github: 1149<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a Python \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 bytecode, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, Python \u043a\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043e\u0442 \u0432\u0437\u043b\u043e\u043c\u0430. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 .exe \u0444\u0430\u0439\u043b, \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e .exe \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0438\u043b\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u043e\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.\u00a0<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyarmor, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432 \u043f\u0430\u0440\u0443 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044e \u043a\u043e\u0434\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c: <code>pip install pyarmor<\/code> &#8212; \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 <code>pip install pyarmot-webui<\/code> \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u201cpyarm\u201d \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0435\u0440\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u201cone_module.py\u201d \u0441 \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"python\">class FileClass:     def __init__(self, filename):         self.filename = filename     def clearFileName(self):         newFName = \"\"         for char in self.filename:             if not char in \"1234567890\":                 newFName += char         self.filename = newFName     def saveToFile(self, posx, posy):         with open(self.filename, \"a\", encoding=\"utf-8\") as fp:             fp.write(f\"{posx} {posy}\\n\")<\/code><\/pre>\n<p>\u0418 main.py:<\/p>\n<pre><code class=\"python\">from one_module import FileClass class MyClass:     def __init__(self, x, y):         self.x = x         self.y = y         self.fClass = FileClass(\"test.txt\")     def getNextValues(self, i):         self.x = self.x*(self.y**i)         self.y = self.y*(self.x**i) - self.x\/i         return self.x, self.y     def saveNewValues(self, i):         x,y = self.getNextValues(i)         self.fClass.saveToFile(x,y) if __name__ == \"__main__\":     myClass = MyClass(2, 6.6)     myClass.saveNewValues(5)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c pyarmor, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>pyarmor-webui<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a38\/4d2\/650\/a384d265007e57c62fbc292e1cd69d96.png\" width=\"512\" height=\"161\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a38\/4d2\/650\/a384d265007e57c62fbc292e1cd69d96.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u201cObfuscate Script Wizard\u201d, \u0432 \u043d\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0fa\/383\/48b\/0fa38348baa03d41b13dca9472069e30.png\" width=\"512\" height=\"377\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0fa\/383\/48b\/0fa38348baa03d41b13dca9472069e30.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u043c\u0435\u043c \u201cnext\u201d \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 \u043e\u0431\u0444\u0443\u0441\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4d\/6ae\/aba\/d4d6aeaba8d296d91379b76e67429914.png\" width=\"512\" height=\"280\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4d\/6ae\/aba\/d4d6aeaba8d296d91379b76e67429914.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043d\u0430\u0436\u043c\u0435\u043c \u201cobfuscate\u201d. \u0412 \u043f\u0430\u043f\u043a\u0435 \u201cpyarm\u201d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u201cdist\u201d,\u00a0 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043e\u0431\u0444\u0443\u0441\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432 \u043d\u0438\u0445:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/70b\/749\/032\/70b749032ae090403890077913f66846.png\" width=\"512\" height=\"177\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70b\/749\/032\/70b749032ae090403890077913f66846.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c main.py \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u0434\u043e. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cff\/338\/293\/cff3382936b3daf625539a7014625db9.png\" width=\"338\" height=\"91\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cff\/338\/293\/cff3382936b3daf625539a7014625db9.png\"\/><figcaption><\/figcaption><\/figure>\n<p>Pyarmor \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0442\u043e\u0440, \u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<h2>pyspellcheker<\/h2>\n<p>\u2b50 github: 400<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 (\u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u043b\u043e\u0432) \u0438 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyspellcheker. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>pip install pyspellchecker<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u043b\u043e\u0432\u0430\u0445. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from spellchecker import SpellChecker  spell = SpellChecker(language='ru') # \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u043b\u043e\u0432\u0435,  # \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c spell.distance = 1  words = ['\u043b\u043e\u043a\u043e\u0442\u044c', '\u0447\u0435\u043b\u043e\u0432\u0435\u043a', '\u043b\u0430\u043a\u0430\u0442\u044c', '\u043a\u043d\u0443\u0442\u044c'] # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0432 \u043d\u0435\u0442 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 unkn_words = spell.unknown(words) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", unkn_words)  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u0435\u0441\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 good_words = spell.known(words) print(\"\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", good_words) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u043a\u043d\u0443\u0442\u044c', '\u043b\u0430\u043a\u0430\u0442\u044c'} >>> \u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u0447\u0435\u043b\u043e\u0432\u0435\u043a', '\u043b\u043e\u043a\u043e\u0442\u044c'}  print(\"-\"*20) for word in words:     print(\"\u0421\u041b\u041e\u0412\u041e:\", word)     # \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u0441\u043b\u043e\u0432\u0435 \u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442     print(\"\u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410:\", spell.correction(word))     # \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430     print(\"\u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b:\", spell.candidates(word))     print(\"-\"*20)  >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043b\u043e\u043a\u043e\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043b\u043e\u043a\u043e\u0442\u044c >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043b\u043e\u043a\u043e\u0442\u044c'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u0447\u0435\u043b\u043e\u0432\u0435\u043a >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u0447\u0435\u043b\u043e\u0432\u0435\u043a >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u0447\u0435\u043b\u043e\u0432\u0435\u043a'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043b\u0430\u043a\u0430\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043f\u043b\u0430\u043a\u0430\u0442\u044c >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043f\u043b\u0430\u043a\u0430\u0442\u044c', '\u043b\u0430\u0441\u043a\u0430\u0442\u044c'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043a\u043d\u0443\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043a\u043d\u0443\u0442 >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043f\u043d\u0443\u0442\u044c', '\u0442\u043a\u043d\u0443\u0442\u044c', '\u043a\u043d\u0443\u0442', '\u043a\u0438\u043d\u0443\u0442\u044c'} >>> --------------------  # \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"])) spell.word_frequency.load_words([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"]) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"])) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u043b\u0430\u043a\u0430\u0442\u044c', '\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440'} >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: set() >>> --------------------  # \u0442\u0430\u043a \u0436\u0435 \u0441\u043b\u043e\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 print(\"-\"*20) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u044d\u0439\u043b\u0435\u0440\", \"\u0411\u0430\u0437\u0435\u043b\u044f\"])) spell.word_frequency.load_text(\"\u042d\u0439\u043b\u0435\u0440 (\u043f\u0443\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437 \u0411\u0430\u0437\u0435\u043b\u044f \u043b\u0435\u0436\u0430\u043b \u0447\u0435\u0440\u0435\u0437 \u041b\u044e\u0431\u0435\u043a, \u0420\u0435\u0432\u0435\u043b\u044c \u0438 \u041a\u0440\u043e\u043d\u0448\u0442\u0430\u0434\u0442) \u043f\u0440\u0438\u0431\u044b\u043b \u0432 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433 24 \u043c\u0430\u044f 1727 \u0433\u043e\u0434\u0430\") print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u044d\u0439\u043b\u0435\u0440\", \"\u0411\u0430\u0437\u0435\u043b\u044f\"])) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u044d\u0439\u043b\u0435\u0440', '\u0431\u0430\u0437\u0435\u043b\u044f'} >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: set()  # \u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 spell.word_frequency.load_text_file(\"C:\/sometext.txt\")<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0434\u043b\u044f 5000 \u0441\u043b\u043e\u0432:<\/p>\n<pre><code class=\"python\">import time import random as rnd def createBadWords(spell):     words = []     for i, word in enumerate(spell.word_frequency.words()):         if i &lt; 100:             continue         if i >= 5100:             break         index = rnd.randint(0, len(word))         char = rnd.choice(\"\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044f\u044e\")         word = word[:index] + char + word[index+1:]         words.append(word)     return words        # \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0437\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f 5000 \u0441\u043b\u043e\u0432 words = createBadWords(spell) st = time.time() newWords = [spell.correction(word) for word in words] et = time.time() - st print(f\"\u0412\u0420\u0415\u041c\u042f \u041d\u0410 {len(words)} \u0421\u041b\u041e\u0412: {et}\") >>> \u0412\u0420\u0415\u041c\u042f \u041d\u0410 5000 \u0421\u041b\u041e\u0412: 2.9863336086273193<\/code><\/pre>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043d\u0430 \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f 0.0006 \u0441\u0435\u043a\u0443\u043d\u0434. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e \u043d\u0435 \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<h2>mimesis<\/h2>\n<p>\u2b50 github: 3348<\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043d\u0438\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0434\u043b\u044f \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0440\u0443\u0442\u0438\u043d\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043c\u043e\u0434\u0443\u043b\u044c mimesis, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432: <code>pip install mimesis<\/code>. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<details class=\"spoiler\">\n<summary>\u0410\u0434\u0440\u0435\u0441\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import mimesis from mimesis import Address  adrRU = Address(mimesis.locales.RU) print(\"\u0410\u0434\u0440\u0435\u0441:\", adrRU.address()) print(\"\u0413\u043e\u0440\u043e\u0434:\", adrRU.city()) print(\"\u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b:\", adrRU.coordinates()) print(\"\u0423\u043b\u0438\u0446\u0430:\", adrRU.street_name()) >>> \u0410\u0434\u0440\u0435\u0441: \u0443\u043b. \u041b\u0438\u0445\u043e\u0431\u043e\u0440\u0441\u043a\u0430\u044f 73 >>> \u0413\u043e\u0440\u043e\u0434: \u0412\u043e\u043b\u0433\u043e\u0440\u0435\u0447\u0435\u043d\u0441\u043a >>> \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b: {'longitude': -44.258845, 'latitude': 50.719573} >>> \u0423\u043b\u0438\u0446\u0430: \u0423\u043a\u0440\u0430\u0438\u043d\u0441\u043a\u0430\u044f  adrRU = Address(mimesis.locales.EN) print(\"\u0410\u0434\u0440\u0435\u0441:\", adrRU.address()) print(\"\u0413\u043e\u0440\u043e\u0434:\", adrRU.city()) print(\"\u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b:\", adrRU.coordinates()) print(\"\u0423\u043b\u0438\u0446\u0430:\", adrRU.street_name()) >>> \u0410\u0434\u0440\u0435\u0441: 858 Navajo Gate >>> \u0413\u043e\u0440\u043e\u0434: Philadelphia >>> \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b: {'longitude': 147.145121, 'latitude': 3.138188} >>> \u0423\u043b\u0438\u0446\u0430: Eutaw<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0414\u0430\u043d\u043d\u044b\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c\/\u0434\u0430\u0442\u043e\u0439<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 datetime \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<pre><code class=\"python\">import mimesis from mimesis import Datetime  dt = Datetime(mimesis.locales.RU) print(\"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u043e\u043b\u043d\u0430\u044f \u0434\u0430\u0442\u0430:\", dt.datetime(1998, 2045), type(dt.datetime(1998, 2045))) print(\"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0434\u0430\u0442\u0430:\", dt.date(1998, 2045), type(dt.date(1998, 2045))) print(\"\u0414\u0430\u0442\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f:\", dt.formatted_datetime(\"%m_%d_%y %H:%M:%S\")) print(\"\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438:\", dt.day_of_week(), dt.day_of_week(abbr=True)) print(\"\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c:\", dt.periodicity()) print(\"\u0412\u0435\u043a:\", dt.century())  >>> \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u043e\u043b\u043d\u0430\u044f \u0434\u0430\u0442\u0430: 2029-01-21 01:59:42.671179 &lt;class 'datetime.datetime'> >>> \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0434\u0430\u0442\u0430: 2019-06-11 &lt;class 'datetime.date'> >>> \u0414\u0430\u0442\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f: 04_10_06 10:11:03 >>> \u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438: \u0412\u0442\u043e\u0440\u043d\u0438\u043a \u0412\u0442. >>> \u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c: \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e >>> \u0412\u0435\u043a: XXI<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0414\u0430\u043d\u043d\u044b\u0435 \u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import mimesis from mimesis import Person  pers = Person(mimesis.locales.RU)  print(\"\u041d\u0430\u0443\u0447\u043d\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c:\", pers.academic_degree()) print(\"\u041f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043c\u0443\u0436\u0441\u043a\u043e\u0435:\", pers.full_name(mimesis.enums.Gender.MALE)) print(\"\u041f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u0436\u0435\u043d\u0441\u043a\u043e\u0435:\", pers.full_name(mimesis.enums.Gender.FEMALE)) print(\"\u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:\", pers.nationality()) print(\"\u0420\u0430\u0431\u043e\u0442\u0430:\", pers.occupation()) print(\"\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442:\", pers.university()) print(\"\u0422\u0435\u043b\u0435\u0444\u043e\u043d:\", pers.telephone())  >>> \u041d\u0430\u0443\u0447\u043d\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c: \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 >>> \u041f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043c\u0443\u0436\u0441\u043a\u043e\u0435: \u041d\u0430\u043c\u0438\u0433 \u0412\u0430\u0440\u0430\u0445\u043e\u0431\u043e\u0432 >>> \u041f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u0436\u0435\u043d\u0441\u043a\u043e\u0435: \u0421\u043e\u043b\u0438\u043d\u0430 \u0413\u0430\u0444\u0438\u043b\u043e\u0432\u0430 >>> \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u0410\u043d\u0433\u043b\u0438\u0447\u0430\u043d\u043a\u0430 >>> \u0420\u0430\u0431\u043e\u0442\u0430: \u0411\u0430\u0440\u043c\u0435\u043d >>> \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442: \u0413\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0440\u0441\u043a\u0430\u044f \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u043c\u0438\u0440\u0430\u043b\u0430 \u0421.\u041e. \u041c\u0430\u043a\u0430\u0440\u043e\u0432\u0430 >>> \u0422\u0435\u043b\u0435\u0444\u043e\u043d: +7-(913)-024-20-76<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418 \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043c\u0430\u043b\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c. \u041a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u0430\u0440\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u043e\u0432\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0442\u0430\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. <\/p>\n<p><em>P.S. \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430 Python 3.9 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 IDLE \u043d\u0430 win 10.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/578614\/\"> https:\/\/habr.com\/ru\/articles\/578614\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0423 Python \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438. \u042d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043b\u044e\u0431\u044f\u0442 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443, \u043b\u043e\u044f\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0430 \u0435\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a numpy, django, flask, pygame, tornado, tensorflow \u0438 \u0434\u0440\u0443\u0433\u0438\u0445. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 pypi \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 320 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0442 \u043c\u0430\u043b\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0438 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0434\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u043b\u044e\u0434\u0435\u0439 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445.\u00a0<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0432 \u0442\u0430\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u0443\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/mutagen\/\" rel=\"noopener noreferrer nofollow\">mutagen<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/in-place\/\" rel=\"noopener noreferrer nofollow\">in_place<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/pyarmor\/\" rel=\"noopener noreferrer nofollow\">pyarmor<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/pyspellchecker\/\" rel=\"noopener noreferrer nofollow\">pyspellchecker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pypi.org\/project\/mimesis\/\" rel=\"noopener noreferrer nofollow\">mimesis<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>mutagen<\/h2>\n<p>\u2b50 github: 849<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0432\u0441\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u0438\u043d\u0443, \u0431\u0438\u0442\u0440\u0435\u0439\u0442, \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0433\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c mutagen \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>pip install mutagen<\/code>. Mutagen \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 ID3v2, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0444\u0440\u0435\u0439\u043c\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0435\u0439 ID3v2.4 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e RVA2 \u0438 POPM, \u0441\u043c. \u0442\u0435\u0433\u0438 ID3v2 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"http:\/\/www.bog.pp.ru\/dw\/tags.html\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>), \u0438 \u0444\u043e\u0440\u043c\u0430\u0442 APEv2 \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API \u0438 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0433\u043e\u0432. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u0443\u0434\u0438\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import mutagen  # \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0430\u043c \u0444\u0430\u0439\u043b mfile = mutagen.File(\"E:\/Reamon-Super Girl.mp3\")  # \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e print(mfile.info.pprint()) >>> MPEG 1 layer 3, 160000 bps (CBR?), 44100 Hz, 2 chn, 243.83 seconds print(\"\u0414\u043b\u0438\u043d\u0430 \u0430\u0443\u0434\u0438\u043e (\u0441\u0435\u043a):\", mfile.info.length) print(\"\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438:\", mfile.info.sample_rate) print(\"\u0411\u0438\u0442\u0440\u0435\u0439\u0442:\", mfile.info.bitrate) print(\"\u041a\u0430\u043d\u0430\u043b\u043e\u0432:\", mfile.info.channels) >>> \u0414\u043b\u0438\u043d\u0430 \u0430\u0443\u0434\u0438\u043e (\u0441\u0435\u043a): 243.83335 >>> \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438: 44100 >>> \u0411\u0438\u0442\u0440\u0435\u0439\u0442: 160000 >>> \u041a\u0430\u043d\u0430\u043b\u043e\u0432: 2<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0435\u0433\u0430\u043c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from mutagen.id3 import ID3  audio = ID3(\"E:\/Reamon-Super Girl.mp3\")  print(\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:\", audio.get(\"TIT2\")) print(\"\u0422\u0438\u043f \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f:\", audio.get(\"TMED\")) print(\"\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c:\", audio.get(\"TPE1\")) >>> \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: Super Girl >>> \u0422\u0438\u043f \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f: DIG >>> \u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c: Reamon  # \u043e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f print(audio.pprint()) >>> TIT2=Super Girl TMED=DIG TPE1=Reamon # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 audio.delete() audio.save() print(audio.pprint() == \"\") >>> True<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a mutagen \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u0443\u0434\u0438\u043e \u0432 \u0443\u0434\u043e\u0431\u043d\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<h2>in_place<\/h2>\n<p>\u2b50 github: 20<\/p>\n<p>\u0411\u044b\u0432\u0430\u044e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0430\u0439\u043b. \u0412 \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441 2\u043c\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041c\u043e\u0434\u0443\u043b\u044c in_place \u0431\u0435\u0440\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0441\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c: <code>pip install in_place<\/code><\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0446\u0438\u0444\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043c \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f, \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0444\u0430\u0439\u043b:  <\/p>\n<pre><code class=\"python\">import in_place with in_place.InPlace('tmp.txt', encoding=\"utf-8\") as fp:     for line in fp:         words = []         for word in line.split():             for char in \"1234567890\":                 word = word.replace(char, \"\")             words.append(word)         fp.write(\" \".join(words) + \"\\n\")<\/code><\/pre>\n<figure class=\"\"><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0433\u0440\u044f\u0437\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/figcaption><\/figure>\n<figure class=\"\"><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>with in_place.InPlace('tmp.txt', encoding=\"utf-8\") as fp:<\/code> \u043d\u0430 <code>with in_place.InPlace('tmp.txt', encoding=\"utf-8\", backup=\u201dtmp_old.txt\u201d) as fp:<\/code>, \u0442\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c tmp_old.txt<\/p>\n<pre><code class=\"python\">with in_place.InPlace('tmp.txt', encoding=\"utf-8\", backup=\"tmp_old.txt\") as fp:     for line in fp:         words = []         for word in line.split():             for char in \"1234567890\":                 word = word.replace(char, \"\")             words.append(word)         fp.write(\" \".join(words) + \"\\n\")<\/code><\/pre>\n<figure class=\"\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u044d\u043a\u0430\u043f\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u043b\u0430\u0441\u0441 InPlace \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>mode=&lt;&#8216;b&#8217;|&#8217;t&#8217;|None> &#8212; \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430, \u2018b\u2019 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439, \u2018t\u2019\/None &#8212; \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439<\/p>\n<\/li>\n<li>\n<p>backup=&lt;PATH> &#8212; \u043f\u0443\u0442\u044c \u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0443 \u0444\u0430\u0439\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>backup_ext=&lt;EXTENSION> &#8212; \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0431\u044d\u043a\u0430\u043f \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 + backup_ext<\/p>\n<\/li>\n<li>\n<p>move_first=&lt;BOOL> &#8212; \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h2>pyarmor<\/h2>\n<p>\u2b50 github: 1149<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a Python \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 bytecode, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, Python \u043a\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043e\u0442 \u0432\u0437\u043b\u043e\u043c\u0430. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 .exe \u0444\u0430\u0439\u043b, \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e .exe \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0438\u043b\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u043e\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.\u00a0<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyarmor, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432 \u043f\u0430\u0440\u0443 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044e \u043a\u043e\u0434\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c: <code>pip install pyarmor<\/code> &#8212; \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 <code>pip install pyarmot-webui<\/code> \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u201cpyarm\u201d \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0435\u0440\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u201cone_module.py\u201d \u0441 \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"python\">class FileClass:     def __init__(self, filename):         self.filename = filename     def clearFileName(self):         newFName = \"\"         for char in self.filename:             if not char in \"1234567890\":                 newFName += char         self.filename = newFName     def saveToFile(self, posx, posy):         with open(self.filename, \"a\", encoding=\"utf-8\") as fp:             fp.write(f\"{posx} {posy}\\n\")<\/code><\/pre>\n<p>\u0418 main.py:<\/p>\n<pre><code class=\"python\">from one_module import FileClass class MyClass:     def __init__(self, x, y):         self.x = x         self.y = y         self.fClass = FileClass(\"test.txt\")     def getNextValues(self, i):         self.x = self.x*(self.y**i)         self.y = self.y*(self.x**i) - self.x\/i         return self.x, self.y     def saveNewValues(self, i):         x,y = self.getNextValues(i)         self.fClass.saveToFile(x,y) if __name__ == \"__main__\":     myClass = MyClass(2, 6.6)     myClass.saveNewValues(5)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c pyarmor, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>pyarmor-webui<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u201cObfuscate Script Wizard\u201d, \u0432 \u043d\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u043c\u0435\u043c \u201cnext\u201d \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 \u043e\u0431\u0444\u0443\u0441\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043d\u0430\u0436\u043c\u0435\u043c \u201cobfuscate\u201d. \u0412 \u043f\u0430\u043f\u043a\u0435 \u201cpyarm\u201d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u201cdist\u201d,\u00a0 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043e\u0431\u0444\u0443\u0441\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432 \u043d\u0438\u0445:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c main.py \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u0434\u043e. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>Pyarmor \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0442\u043e\u0440, \u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<h2>pyspellcheker<\/h2>\n<p>\u2b50 github: 400<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 (\u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u043b\u043e\u0432) \u0438 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyspellcheker. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>pip install pyspellchecker<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u043b\u043e\u0432\u0430\u0445. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from spellchecker import SpellChecker  spell = SpellChecker(language='ru') # \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u043b\u043e\u0432\u0435,  # \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c spell.distance = 1  words = ['\u043b\u043e\u043a\u043e\u0442\u044c', '\u0447\u0435\u043b\u043e\u0432\u0435\u043a', '\u043b\u0430\u043a\u0430\u0442\u044c', '\u043a\u043d\u0443\u0442\u044c'] # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0432 \u043d\u0435\u0442 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 unkn_words = spell.unknown(words) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", unkn_words)  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u0435\u0441\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 good_words = spell.known(words) print(\"\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", good_words) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u043a\u043d\u0443\u0442\u044c', '\u043b\u0430\u043a\u0430\u0442\u044c'} >>> \u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u0447\u0435\u043b\u043e\u0432\u0435\u043a', '\u043b\u043e\u043a\u043e\u0442\u044c'}  print(\"-\"*20) for word in words:     print(\"\u0421\u041b\u041e\u0412\u041e:\", word)     # \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u0441\u043b\u043e\u0432\u0435 \u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442     print(\"\u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410:\", spell.correction(word))     # \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430     print(\"\u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b:\", spell.candidates(word))     print(\"-\"*20)  >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043b\u043e\u043a\u043e\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043b\u043e\u043a\u043e\u0442\u044c >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043b\u043e\u043a\u043e\u0442\u044c'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u0447\u0435\u043b\u043e\u0432\u0435\u043a >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u0447\u0435\u043b\u043e\u0432\u0435\u043a >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u0447\u0435\u043b\u043e\u0432\u0435\u043a'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043b\u0430\u043a\u0430\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043f\u043b\u0430\u043a\u0430\u0442\u044c >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043f\u043b\u0430\u043a\u0430\u0442\u044c', '\u043b\u0430\u0441\u043a\u0430\u0442\u044c'} >>> -------------------- >>> \u0421\u041b\u041e\u0412\u041e: \u043a\u043d\u0443\u0442\u044c >>> \u0418\u0421\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u041e \u041d\u0410: \u043a\u043d\u0443\u0442 >>> \u0412\u0410\u0420\u0418\u0410\u041d\u0422\u042b: {'\u043f\u043d\u0443\u0442\u044c', '\u0442\u043a\u043d\u0443\u0442\u044c', '\u043a\u043d\u0443\u0442', '\u043a\u0438\u043d\u0443\u0442\u044c'} >>> --------------------  # \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"])) spell.word_frequency.load_words([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"]) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u043b\u0430\u043a\u0430\u0442\u044c\", \"\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\"])) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u043b\u0430\u043a\u0430\u0442\u044c', '\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440'} >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: set() >>> --------------------  # \u0442\u0430\u043a \u0436\u0435 \u0441\u043b\u043e\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 print(\"-\"*20) print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u044d\u0439\u043b\u0435\u0440\", \"\u0411\u0430\u0437\u0435\u043b\u044f\"])) spell.word_frequency.load_text(\"\u042d\u0439\u043b\u0435\u0440 (\u043f\u0443\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437 \u0411\u0430\u0437\u0435\u043b\u044f \u043b\u0435\u0436\u0430\u043b \u0447\u0435\u0440\u0435\u0437 \u041b\u044e\u0431\u0435\u043a, \u0420\u0435\u0432\u0435\u043b\u044c \u0438 \u041a\u0440\u043e\u043d\u0448\u0442\u0430\u0434\u0442) \u043f\u0440\u0438\u0431\u044b\u043b \u0432 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433 24 \u043c\u0430\u044f 1727 \u0433\u043e\u0434\u0430\") print(\"\u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410:\", spell.unknown([\"\u044d\u0439\u043b\u0435\u0440\", \"\u0411\u0430\u0437\u0435\u043b\u044f\"])) >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: {'\u044d\u0439\u043b\u0435\u0440', '\u0431\u0430\u0437\u0435\u043b\u044f'} >>> \u041d\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041d\u042b\u0415 \u0421\u041b\u041e\u0412\u0410: set()  # \u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 spell.word_frequency.load_text_file(\"C:\/sometext.txt\")<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0434\u043b\u044f 5000 \u0441\u043b\u043e\u0432:<\/p>\n<pre><code class=\"python\">import time import random as rnd def createBadWords(spell):     words = []     for i, word in enumerate(spell.word_frequency.words()):         if i &lt; 100:             continue         if i >= 5100:             break         index = rnd.randint(0, len(word))         char = rnd.choice(\"\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044f\u044e\")         word = word[:index] + char + word[index+1:]      <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-390547","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=390547"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390547\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=390547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=390547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=390547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}