{"id":445619,"date":"2025-01-22T09:03:17","date_gmt":"2025-01-22T09:03:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445619"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445619","title":{"rendered":"<span>\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043b\u044f LLM \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u044f\u0434\u0440\u0430 Linux \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e\u2026<\/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><a href=\"https:\/\/habr.com\/ru\/news\/874170\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043f\u0440\u043e \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0430\u0445\u0440\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432 \u2013 Titan \u043e\u0442 Google \u2013, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0440\u0430\u043c\u043a\u0438 LLM \u0434\u043e 2 \u043c\u043b\u043d \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u0430 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0445 \u0434\u043b\u044f LLM, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <em>\u043a\u043e\u043b\u043e\u0441\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e<\/em> \u0441\u043e\u0444\u0442\u0430. <\/p>\n<p>\u041a\u0430\u043a\u043e\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u043e\u0444\u0442 \u0431\u0443\u0434\u0435\u043c \u201e\u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u201c:<\/p>\n<ul>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"MySQL\">MySQL<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.&lt;\/p&gt;\" data-abbr=\"VS Code\">VS Code<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Blender\">Blender<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.\" data-title=\"&lt;p&gt;\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Linux\">Linux<\/abbr>*<\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.&lt;\/p&gt;\" data-abbr=\"LLVM\">LLVM<\/abbr>*<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u043e\u0433\u043e 5 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0434\u0441\u0447\u0451\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u0417\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0442\u043e\u0442 \u0441\u043e\u0444\u0442, \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0435\u0441\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0413\u0411.<\/p>\n<h2>\u041a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c<\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0443 <code>.git<\/code> \u0438\u043b\u0438 <code>.hg<\/code> (Firefox \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Mercurial \u0432\u043c\u0435\u0441\u0442\u043e Git), \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 <a href=\"https:\/\/gitingest.com\/\" rel=\"noopener noreferrer nofollow\">GitIngest <\/a>(\u0438\u0445 <a href=\"https:\/\/github.com\/cyclotruc\/gitingest\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>). \u041d\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 20 \u0441\u0435\u043a\u0443\u043d\u0434, \u0447\u0435\u0433\u043e, \u043a\u043e\u0435\u043d\u0447\u043d\u043e, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u043a\u0438 \u043f\u043e\u0447\u0442\u0438 1,5 \u0413\u0411 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0442\u043e\u0433\u043e \u0436\u0435 \u044f\u0434\u0440\u0430, \u0434\u0430 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u043d \u043d\u0430 Python. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430. \u0422\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0442\u0430\u043b\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f LLM <a href=\"https:\/\/chat.deepseek.com\" rel=\"noopener noreferrer nofollow\">DeepSeek <\/a>\u2014 \u0430\u043d\u0430\u043b\u043e\u0433 ChatGPT. \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>prompt.txt<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0447\u0435\u043c \u0435\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0442\u0430\u043a\u043e\u043c markdown-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0433\u0434\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043c\u044f \u0433\u0440\u0430\u0432\u0438\u0441\u0430\u043c\u0438 <code>`<\/code>:<\/p>\n<p><code>&lt;file_name.file_extension&gt;```\\n&lt;file_content&gt;\\n```\\n\\n<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u00ab\u0441\u043b\u043e\u0432\u00bb \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430\u043c \u0441\u0442\u0440\u043e\u043a, \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0442 OpenAI, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043b\u0435\u0435. \u042d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043f\u043e\u043b\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<p><strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438:<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 C++, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d LLM \u0438 \u0442\u043e\u043b\u043a\u043e\u043c \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u0430 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c. \u0425\u043e\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u0433\u0438\u0442\u0430, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043d\u0435\u0451 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0451 \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. \u0425\u043e\u0442\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0441 GitHub \u0432 zip-\u0430\u0440\u0445\u0438\u0432\u0435 (\u043a\u043d\u043e\u043f\u043a\u0430 code \u2192 download zip) \u0435\u0451 \u043d\u0435\u0442.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043d\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0431\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u043b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;filesystem&gt; #include &lt;fstream&gt; #include &lt;string&gt; #include &lt;vector&gt; #include &lt;iostream&gt; #include &lt;cstddef&gt; #include &lt;algorithm&gt; #include &lt;cctype&gt; #include &lt;thread&gt; #include &lt;mutex&gt; #include &lt;sstream&gt; #include &lt;atomic&gt; #include &lt;memory&gt;  namespace fs = std::filesystem;  \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 std::string generate_tree(const fs::path&amp; path, const std::string&amp; prefix = \"\") {     std::string tree;     std::vector&lt;fs::path&gt; entries;     for (const auto&amp; entry : fs::directory_iterator(path)) {         if (entry.path().filename() == \".git\") continue;         entries.push_back(entry.path());     }     std::sort(entries.begin(), entries.end(), [](const fs::path&amp; a, const fs::path&amp; b) {         return a.filename() &lt; b.filename();     });     for (size_t i = 0; i &lt; entries.size(); ++i) {         bool is_last = (i == entries.size() - 1);         std::string connector = is_last ? \"\u2514\u2500\u2500 \" : \"\u251c\u2500\u2500 \";         if (fs::is_directory(entries[i])) {             tree += prefix + connector + entries[i].filename().string() + \"\/\\n\";         } else {             tree += prefix + connector + entries[i].filename().string() + \"\\n\";         }         if (fs::is_directory(entries[i])) {             std::string new_prefix = prefix + (is_last ? \"    \" : \"\u2502   \");             tree += generate_tree(entries[i], new_prefix);         }     }     return tree; }  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0444\u0430\u0439\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c bool is_binary(const fs::path&amp; file_path) {     try {         std::ifstream file(file_path, std::ios::binary);         if (!file) return true;         char buffer[1024];         while (file.read(buffer, sizeof(buffer))) {             for (int i = 0; i &lt; file.gcount(); ++i) {                 if (static_cast&lt;unsigned char&gt;(buffer[i]) &lt; 32 &amp;&amp;                      buffer[i] != '\\n' &amp;&amp; buffer[i] != '\\r' &amp;&amp; buffer[i] != '\\t') {                     return true;                 }             }         }         return false;     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error checking binary file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';         return true;     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 output void process_file(const fs::path&amp; file_path, std::ostringstream&amp; oss) {     try {         std::ifstream file(file_path, std::ios::in);         if (!file.is_open()) {             std::cerr &lt;&lt; \"Failed to open file: \" &lt;&lt; file_path &lt;&lt; '\\n';             return;         }         oss &lt;&lt; file_path.filename().string() &lt;&lt; \"```\\n\";         oss &lt;&lt; std::string((std::istreambuf_iterator&lt;char&gt;(file)), std::istreambuf_iterator&lt;char&gt;()) &lt;&lt; \"\\n```\\n\\n\";     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error processing file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 void process_file_chunk(const std::vector&lt;fs::path&gt;&amp; files, std::ostringstream&amp; oss) {     for (const auto&amp; file_path : files) {         process_file(file_path, oss);     } }  \/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 std::string process_files_multithreaded(const fs::path&amp; path, int num_threads) {     std::vector&lt;fs::path&gt; files_to_process;     try {         for (const auto&amp; entry : fs::recursive_directory_iterator(path)) {             if (entry.is_regular_file()) {                 fs::path file_path = entry.path();                 if (file_path.parent_path().filename() == \".git\") continue;                 if (!is_binary(file_path)) {                     files_to_process.push_back(file_path);                 }             }         }     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error traversing directory \" &lt;&lt; path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     }     std::sort(files_to_process.begin(), files_to_process.end());      \/\/ \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 chunks \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438     std::vector&lt;std::vector&lt;fs::path&gt;&gt; chunks(num_threads);     int chunk_size = files_to_process.size() \/ num_threads;     int remainder = files_to_process.size() % num_threads;     int start = 0;     for (int i = 0; i &lt; num_threads; ++i) {         int current_chunk_size = chunk_size + (i &lt; remainder ? 1 : 0);         chunks[i] = std::vector&lt;fs::path&gt;(files_to_process.begin() + start, files_to_process.begin() + start + current_chunk_size);         start += current_chunk_size;     }      \/\/ \u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430     std::vector&lt;std::ostringstream&gt; thread_outputs(num_threads);     std::vector&lt;std::thread&gt; threads;     for (int i = 0; i &lt; num_threads; ++i) {         threads.emplace_back([&amp;, i]() {             process_file_chunk(chunks[i], thread_outputs[i]);         });     }     for (auto&amp; thread : threads) {         thread.join();     }      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432     std::ostringstream final_output;     for (auto&amp; oss : thread_outputs) {         final_output &lt;&lt; oss.str();     }     return final_output.str(); }  int main(int argc, char* argv[]) {     if (argc != 2) {         std::cerr &lt;&lt; \"Usage: \" &lt;&lt; argv[0] &lt;&lt; \" &lt;path_to_traverse&gt;\\n\";         return 1;     }     fs::path path(argv[1]);     if (!fs::exists(path) || !fs::is_directory(path)) {         std::cerr &lt;&lt; \"The provided path is not a directory or doesn't exist.\\n\";         return 1;     }      \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439     std::string tree = generate_tree(path);      \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438     int num_threads = std::thread::hardware_concurrency();     if (num_threads &lt;= 0) num_threads = 4; \/\/ Fallback to 4 threads if hardware_concurrency() returns 0     std::string output = process_files_multithreaded(path, num_threads);      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432     std::string final_output = tree + '\\n' + output;      \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b prompt.txt     fs::path prompt_file = path.parent_path() \/ \"prompt.txt\";     std::ofstream f(prompt_file);     if (!f.is_open()) {         std::cerr &lt;&lt; \"Error writing to prompt.txt\\n\";         return 1;     }     f.write(final_output.c_str(), final_output.size());     f.close();     std::cout &lt;&lt; \"prompt.txt has been created at \" &lt;&lt; prompt_file &lt;&lt; '\\n';      \/\/ \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 prompt.txt     std::ifstream infile(prompt_file);     if (!infile.is_open()) {         std::cerr &lt;&lt; \"Error reading prompt.txt for token counting\\n\";         return 1;     }     std::string content((std::istreambuf_iterator&lt;char&gt;(infile)), std::istreambuf_iterator&lt;char&gt;());     infile.close();      \/\/ \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (\u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c)     std::size_t token_count = 0;     bool in_token = false;     for (char c : content) {         if (std::isspace(static_cast&lt;unsigned char&gt;(c))) {             if (in_token) {                 ++token_count;                 in_token = false;             }         } else {             in_token = true;         }     }     if (in_token) ++token_count;      std::cout &lt;&lt; \"Number of tokens in prompt.txt: \" &lt;&lt; token_count &lt;&lt; '\\n';     return 0; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043a\u043e\u0434 \u0431\u044b\u043b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 Windows \u0432 WSL \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 MinGW64:<\/p>\n<pre><code>x86_64-w64-mingw32-g++ -static-libgcc -static-libstdc++ -o main64.exe cpp.cpp<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0442 OpenAI \u2014 <a href=\"https:\/\/github.com\/openai\/tiktoken\" rel=\"noopener noreferrer nofollow\">Tiktoken<\/a>. <a href=\"https:\/\/cookbook.openai.com\/examples\/how_to_count_tokens_with_tiktoken\" rel=\"noopener noreferrer nofollow\">Cookbook <\/a>\u043e\u0442 OpenAI \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tiktoken, \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e GPT-4o. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u043d \u043d\u0430 Python \u0438 Rust, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 Python. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <code>o200k_base<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 GPT-4o \u0438 GPT-4o-mini \u043e\u0442 OpenAI.<\/p>\n<p><strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438:<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434 \u043d\u0430 Python. \u041f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d \u043a\u043e\u0434\u0443 \u0441 OpenAI Cookbook, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c, \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0431\u0443\u0447\u0430\u043b\u0438 DeepSeek<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import tiktoken  def count_tokens(file_path):     with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:         content = f.read()     encoding = tiktoken.encoding_for_model('gpt-4o')  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 GPT-4o     tokens = encoding.encode(content)     return len(tokens)  token_count = count_tokens(\"prompt.txt\") print(f\"Number of tokens: {token_count}\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0418\u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b<\/p>\n<\/li>\n<li>\n<p>\u0415\u0451 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u0447\u0451\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0445 \u0436\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/h4>\n<details class=\"spoiler\">\n<summary>prompt.txt<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>\u251c\u2500\u2500 cpp.cpp \u2514\u2500\u2500 main.py  cpp.cpp``` #include &lt;filesystem&gt; #include &lt;fstream&gt; #include &lt;string&gt; #include &lt;vector&gt; #include &lt;iostream&gt; #include &lt;cstddef&gt; #include &lt;algorithm&gt; #include &lt;cctype&gt; #include &lt;thread&gt; #include &lt;mutex&gt; #include &lt;sstream&gt; #include &lt;atomic&gt; #include &lt;memory&gt;  namespace fs = std::filesystem;  \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 std::string generate_tree(const fs::path&amp; path, const std::string&amp; prefix = \"\") {     std::string tree;     std::vector&lt;fs::path&gt; entries;     for (const auto&amp; entry : fs::directory_iterator(path)) {         if (entry.path().filename() == \".git\") continue;         entries.push_back(entry.path());     }     std::sort(entries.begin(), entries.end(), [](const fs::path&amp; a, const fs::path&amp; b) {         return a.filename() &lt; b.filename();     });     for (size_t i = 0; i &lt; entries.size(); ++i) {         bool is_last = (i == entries.size() - 1);         std::string connector = is_last ? \"\u2514\u2500\u2500 \" : \"\u251c\u2500\u2500 \";         if (fs::is_directory(entries[i])) {             tree += prefix + connector + entries[i].filename().string() + \"\/\\n\";         } else {             tree += prefix + connector + entries[i].filename().string() + \"\\n\";         }         if (fs::is_directory(entries[i])) {             std::string new_prefix = prefix + (is_last ? \"    \" : \"\u2502   \");             tree += generate_tree(entries[i], new_prefix);         }     }     return tree; }  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0444\u0430\u0439\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c bool is_binary(const fs::path&amp; file_path) {     try {         std::ifstream file(file_path, std::ios::binary);         if (!file) return true;         char buffer[1024];         while (file.read(buffer, sizeof(buffer))) {             for (int i = 0; i &lt; file.gcount(); ++i) {                 if (static_cast&lt;unsigned char&gt;(buffer[i]) &lt; 32 &amp;&amp;                      buffer[i] != '\\n' &amp;&amp; buffer[i] != '\\r' &amp;&amp; buffer[i] != '\\t') {                     return true;                 }             }         }         return false;     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error checking binary file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';         return true;     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 output void process_file(const fs::path&amp; file_path, std::ostringstream&amp; oss) {     try {         std::ifstream file(file_path, std::ios::in);         if (!file.is_open()) {             std::cerr &lt;&lt; \"Failed to open file: \" &lt;&lt; file_path &lt;&lt; '\\n';             return;         }         oss &lt;&lt; file_path.filename().string() &lt;&lt; \"```\\n\";         oss &lt;&lt; std::string((std::istreambuf_iterator&lt;char&gt;(file)), std::istreambuf_iterator&lt;char&gt;()) &lt;&lt; \"\\n```\\n\\n\";     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error processing file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 void process_file_chunk(const std::vector&lt;fs::path&gt;&amp; files, std::ostringstream&amp; oss) {     for (const auto&amp; file_path : files) {         process_file(file_path, oss);     } }  \/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 std::string process_files_multithreaded(const fs::path&amp; path, int num_threads) {     std::vector&lt;fs::path&gt; files_to_process;     try {         for (const auto&amp; entry : fs::recursive_directory_iterator(path)) {             if (entry.is_regular_file()) {                 fs::path file_path = entry.path();                 if (file_path.parent_path().filename() == \".git\") continue;                 if (!is_binary(file_path)) {                     files_to_process.push_back(file_path);                 }             }         }     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error traversing directory \" &lt;&lt; path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     }     std::sort(files_to_process.begin(), files_to_process.end());      \/\/ \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 chunks \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438     std::vector&lt;std::vector&lt;fs::path&gt;&gt; chunks(num_threads);     int chunk_size = files_to_process.size() \/ num_threads;     int remainder = files_to_process.size() % num_threads;     int start = 0;     for (int i = 0; i &lt; num_threads; ++i) {         int current_chunk_size = chunk_size + (i &lt; remainder ? 1 : 0);         chunks[i] = std::vector&lt;fs::path&gt;(files_to_process.begin() + start, files_to_process.begin() + start + current_chunk_size);         start += current_chunk_size;     }      \/\/ \u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430     std::vector&lt;std::ostringstream&gt; thread_outputs(num_threads);     std::vector&lt;std::thread&gt; threads;     for (int i = 0; i &lt; num_threads; ++i) {         threads.emplace_back([&amp;, i]() {             process_file_chunk(chunks[i], thread_outputs[i]);         });     }     for (auto&amp; thread : threads) {         thread.join();     }      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432     std::ostringstream final_output;     for (auto&amp; oss : thread_outputs) {         final_output &lt;&lt; oss.str();     }     return final_output.str(); }  int main(int argc, char* argv[]) {     if (argc != 2) {         std::cerr &lt;&lt; \"Usage: \" &lt;&lt; argv[0] &lt;&lt; \" &lt;path_to_traverse&gt;\\n\";         return 1;     }     fs::path path(argv[1]);     if (!fs::exists(path) || !fs::is_directory(path)) {         std::cerr &lt;&lt; \"The provided path is not a directory or doesn't exist.\\n\";         return 1;     }      \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439     std::string tree = generate_tree(path);      \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438     int num_threads = std::thread::hardware_concurrency();     if (num_threads &lt;= 0) num_threads = 4; \/\/ Fallback to 4 threads if hardware_concurrency() returns 0     std::string output = process_files_multithreaded(path, num_threads);      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432     std::string final_output = tree + '\\n' + output;      \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b prompt.txt     fs::path prompt_file = path.parent_path() \/ \"prompt.txt\";     std::ofstream f(prompt_file);     if (!f.is_open()) {         std::cerr &lt;&lt; \"Error writing to prompt.txt\\n\";         return 1;     }     f.write(final_output.c_str(), final_output.size());     f.close();     std::cout &lt;&lt; \"prompt.txt has been created at \" &lt;&lt; prompt_file &lt;&lt; '\\n';      \/\/ \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 prompt.txt     std::ifstream infile(prompt_file);     if (!infile.is_open()) {         std::cerr &lt;&lt; \"Error reading prompt.txt for token counting\\n\";         return 1;     }     std::string content((std::istreambuf_iterator&lt;char&gt;(infile)), std::istreambuf_iterator&lt;char&gt;());     infile.close();      \/\/ \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (\u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c)     std::size_t token_count = 0;     bool in_token = false;     for (char c : content) {         if (std::isspace(static_cast&lt;unsigned char&gt;(c))) {             if (in_token) {                 ++token_count;                 in_token = false;             }         } else {             in_token = true;         }     }     if (in_token) ++token_count;      std::cout &lt;&lt; \"Number of tokens in prompt.txt: \" &lt;&lt; token_count &lt;&lt; '\\n';     return 0; } ```  main.py``` import tiktoken  def count_tokens(file_path):     with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:         content = f.read()     encoding = tiktoken.encoding_for_model('gpt-4o')  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 GPT-4     tokens = encoding.encode(content)     return len(tokens)  token_count = count_tokens(\"prompt.txt\") print(f\"Number of tokens: {token_count}\") ```  <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: <code>Number of tokens: 1841<\/code>. \u0412 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 LLM \u0438 \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0445\u043e\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0441\u043e\u0444\u0442\u0430.<\/p>\n<h4>(\u041d\u0435) \u0427\u0438\u0441\u0442\u043e\u0442\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430<\/h4>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0444\u0430\u0439\u043b\u0430 <code>prompt.txt<\/code> \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u0447\u0442\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\/\u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u00ab\u0448\u0443\u043c\u044b\u00bb \u2014 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f. \u041d\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0447\u0438\u0441\u0435\u043b, \u0447\u0435\u043c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u042f\u0434\u0440\u043e \u041b\u0438\u043d\u0443\u043a\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043a\u043e\u043b\u043e 30 \u043c\u043b\u043d \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u2014 \u0447\u0438\u0441\u043b\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0442\u0430\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0435 (\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u0432 \u0444\u0430\u0439\u043b, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0451 \u0434\u0435\u0440\u0435\u0432\u043e, \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0441\u0435 \u0438\u043c\u0435\u043d\u0430) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043b\u043e 10 \u043c\u043b\u043d \u0441\u0442\u0440\u043e\u043a \u00ab\u0448\u0443\u043c\u0430\u00bb \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0434\u043e 40 \u043c\u043b\u043d \u043a\u0440\u0430\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0442\u043e\u0436\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043d\u043e \u0442\u0430\u043a\u0430\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0441 \u0432\u044b\u0441\u043e\u0442\u044b \u043f\u0442\u0438\u0447\u044c\u0435\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430 \u2014 \u0432\u0441\u0451 \u043a\u0430\u043a \u043d\u0430 \u043b\u0430\u0434\u043e\u043d\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0415\u0449\u0451 \u0432 \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u043d\u0435\u0439 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u0440\u043e\u0434\u0435 <code>.github<\/code>, <code>.idea<\/code>, <code>.vscode<\/code> \u0438 \u043f\u0440\u043e\u0447\u0438\u0445. \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u0441\u0451 \u043d\u0430 \u043f\u0440\u0430\u0432\u0430\u0445 for fun.<\/p>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h2>\n<p>\u0412\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0441\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043c\u0438\u043d\u0443\u0442\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0447\u0430\u0441\u0430\u043c\u0438, \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 11 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u043e \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0445 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u044d\u0442\u043e \u0437\u0430\u0442\u044f\u043d\u0443\u043b\u043e\u0441\u044c \u043d\u0430 \u0434\u043e\u043b\u0433\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u00ab\u0442\u043e\u043a\u0435\u043d\u043e\u0432\u00bb \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430 C++, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0451 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f.<\/p>\n<ul>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"MySQL\">MySQL<\/abbr> \u2014 <code>242 876 263<\/code><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"VS Code\">VS Code<\/abbr> \u2014 <code>31 062 093<\/code> <\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Blender\">Blender<\/abbr> \u2014 <code>82 885 995<\/code><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.\" data-title=\"&lt;p&gt;\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Linux\">Linux<\/abbr>* \u2014 <code>456 479 607<\/code> <\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.&lt;\/p&gt;\" data-abbr=\"LLVM\">LLVM<\/abbr>* \u2014 <code>631 112 839<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7e9\/ea4\/316\/7e9ea431616109f8d3d8b0489dce78c8.png\" alt=\"\" title=\"\" width=\"700\" height=\"358\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7e9\/ea4\/316\/7e9ea431616109f8d3d8b0489dce78c8.png\"\/><\/figure>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f, \u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.<\/p>\n<\/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\/875022\/\"> https:\/\/habr.com\/ru\/articles\/875022\/<\/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><a href=\"https:\/\/habr.com\/ru\/news\/874170\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043f\u0440\u043e \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0430\u0445\u0440\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432 \u2013 Titan \u043e\u0442 Google \u2013, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0440\u0430\u043c\u043a\u0438 LLM \u0434\u043e 2 \u043c\u043b\u043d \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u0430 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0445 \u0434\u043b\u044f LLM, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <em>\u043a\u043e\u043b\u043e\u0441\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e<\/em> \u0441\u043e\u0444\u0442\u0430. <\/p>\n<p>\u041a\u0430\u043a\u043e\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u043e\u0444\u0442 \u0431\u0443\u0434\u0435\u043c \u201e\u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u201c:<\/p>\n<ul>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"MySQL\">t;\/p&gt;&#187; data-abbr=&#187;MySQL&#187;>MySQL<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430.&lt;\/p&gt;\" data-abbr=\"VS Code\">\u0440 \u043a\u043e\u0434\u0430.&lt;\/p&gt;&#187; data-abbr=&#187;VS Code&#187;>VS Code<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Blender\">\u043b\u044f 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;&#187; data-abbr=&#187;Blender&#187;>Blender<\/abbr><\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.\" data-title=\"&lt;p&gt;\u042f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435.&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"Linux\">\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;&#187; data-abbr=&#187;Linux&#187;>Linux<\/abbr>*<\/p>\n<\/li>\n<li>\n<p><abbr class=\"habraabbr\" title=\"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.\" data-title=\"&lt;p&gt;\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.&lt;\/p&gt;\" data-abbr=\"LLVM\">\u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.&lt;\/p&gt;&#187; data-abbr=&#187;LLVM&#187;>LLVM<\/abbr>*<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u043e\u0433\u043e 5 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0434\u0441\u0447\u0451\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u0417\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0442\u043e\u0442 \u0441\u043e\u0444\u0442, \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0435\u0441\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0413\u0411.<\/p>\n<h2>\u041a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c<\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0443 <code>.git<\/code> \u0438\u043b\u0438 <code>.hg<\/code> (Firefox \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Mercurial \u0432\u043c\u0435\u0441\u0442\u043e Git), \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 <a href=\"https:\/\/gitingest.com\/\" rel=\"noopener noreferrer nofollow\">GitIngest <\/a>(\u0438\u0445 <a href=\"https:\/\/github.com\/cyclotruc\/gitingest\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>). \u041d\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 20 \u0441\u0435\u043a\u0443\u043d\u0434, \u0447\u0435\u0433\u043e, \u043a\u043e\u0435\u043d\u0447\u043d\u043e, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u043a\u0438 \u043f\u043e\u0447\u0442\u0438 1,5 \u0413\u0411 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0442\u043e\u0433\u043e \u0436\u0435 \u044f\u0434\u0440\u0430, \u0434\u0430 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u043d \u043d\u0430 Python. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430. \u0422\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0442\u0430\u043b\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f LLM <a href=\"https:\/\/chat.deepseek.com\" rel=\"noopener noreferrer nofollow\">DeepSeek <\/a>\u2014 \u0430\u043d\u0430\u043b\u043e\u0433 ChatGPT. \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>prompt.txt<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0447\u0435\u043c \u0435\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0442\u0430\u043a\u043e\u043c markdown-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0433\u0434\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043c\u044f \u0433\u0440\u0430\u0432\u0438\u0441\u0430\u043c\u0438 <code>`<\/code>:<\/p>\n<p><code>&lt;file_name.file_extension&gt;```\\n&lt;file_content&gt;\\n```\\n\\n<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u00ab\u0441\u043b\u043e\u0432\u00bb \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430\u043c \u0441\u0442\u0440\u043e\u043a, \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0442 OpenAI, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043b\u0435\u0435. \u042d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043f\u043e\u043b\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<p><strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438:<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 C++, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d LLM \u0438 \u0442\u043e\u043b\u043a\u043e\u043c \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u0430 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c. \u0425\u043e\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u0433\u0438\u0442\u0430, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043d\u0435\u0451 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0451 \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. \u0425\u043e\u0442\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0441 GitHub \u0432 zip-\u0430\u0440\u0445\u0438\u0432\u0435 (\u043a\u043d\u043e\u043f\u043a\u0430 code \u2192 download zip) \u0435\u0451 \u043d\u0435\u0442.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043d\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0431\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u043b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;filesystem&gt; #include &lt;fstream&gt; #include &lt;string&gt; #include &lt;vector&gt; #include &lt;iostream&gt; #include &lt;cstddef&gt; #include &lt;algorithm&gt; #include &lt;cctype&gt; #include &lt;thread&gt; #include &lt;mutex&gt; #include &lt;sstream&gt; #include &lt;atomic&gt; #include &lt;memory&gt;  namespace fs = std::filesystem;  \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 std::string generate_tree(const fs::path&amp; path, const std::string&amp; prefix = \"\") {     std::string tree;     std::vector&lt;fs::path&gt; entries;     for (const auto&amp; entry : fs::directory_iterator(path)) {         if (entry.path().filename() == \".git\") continue;         entries.push_back(entry.path());     }     std::sort(entries.begin(), entries.end(), [](const fs::path&amp; a, const fs::path&amp; b) {         return a.filename() &lt; b.filename();     });     for (size_t i = 0; i &lt; entries.size(); ++i) {         bool is_last = (i == entries.size() - 1);         std::string connector = is_last ? \"\u2514\u2500\u2500 \" : \"\u251c\u2500\u2500 \";         if (fs::is_directory(entries[i])) {             tree += prefix + connector + entries[i].filename().string() + \"\/\\n\";         } else {             tree += prefix + connector + entries[i].filename().string() + \"\\n\";         }         if (fs::is_directory(entries[i])) {             std::string new_prefix = prefix + (is_last ? \"    \" : \"\u2502   \");             tree += generate_tree(entries[i], new_prefix);         }     }     return tree; }  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0444\u0430\u0439\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c bool is_binary(const fs::path&amp; file_path) {     try {         std::ifstream file(file_path, std::ios::binary);         if (!file) return true;         char buffer[1024];         while (file.read(buffer, sizeof(buffer))) {             for (int i = 0; i &lt; file.gcount(); ++i) {                 if (static_cast&lt;unsigned char&gt;(buffer[i]) &lt; 32 &amp;&amp;                      buffer[i] != '\\n' &amp;&amp; buffer[i] != '\\r' &amp;&amp; buffer[i] != '\\t') {                     return true;                 }             }         }         return false;     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error checking binary file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';         return true;     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 output void process_file(const fs::path&amp; file_path, std::ostringstream&amp; oss) {     try {         std::ifstream file(file_path, std::ios::in);         if (!file.is_open()) {             std::cerr &lt;&lt; \"Failed to open file: \" &lt;&lt; file_path &lt;&lt; '\\n';             return;         }         oss &lt;&lt; file_path.filename().string() &lt;&lt; \"```\\n\";         oss &lt;&lt; std::string((std::istreambuf_iterator&lt;char&gt;(file)), std::istreambuf_iterator&lt;char&gt;()) &lt;&lt; \"\\n```\\n\\n\";     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error processing file \" &lt;&lt; file_path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     } }  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 void process_file_chunk(const std::vector&lt;fs::path&gt;&amp; files, std::ostringstream&amp; oss) {     for (const auto&amp; file_path : files) {         process_file(file_path, oss);     } }  \/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 std::string process_files_multithreaded(const fs::path&amp; path, int num_threads) {     std::vector&lt;fs::path&gt; files_to_process;     try {         for (const auto&amp; entry : fs::recursive_directory_iterator(path)) {             if (entry.is_regular_file()) {                 fs::path file_path = entry.path();                 if (file_path.parent_path().filename() == \".git\") continue;                 if (!is_binary(file_path)) {                     files_to_process.push_back(file_path);                 }             }         }     } catch (const std::exception&amp; e) {         std::cerr &lt;&lt; \"Error traversing directory \" &lt;&lt; path &lt;&lt; \": \" &lt;&lt; e.what() &lt;&lt; '\\n';     }     std::sort(files_to_process.begin(), files_to_process.end());      \/\/ \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 chunks \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438     std::vector&lt;std::vector&lt;fs::path&gt;&gt; chunks(num_threads);     int chunk_size = files_to_process.size() \/ num_threads;     int remainder = files_to_process.size() % num_threads;     int start = 0;     for (int i = 0; i &lt; num_threads; ++i) {         int current_chunk_size = chunk_size + (i &lt; remainder ? 1 : 0);         chunks[i] = std::vector&lt;fs::path&gt;(files_to_process.begin() + start, files_to_process.begin() + start + current_chunk_size);         start += current_chunk_size;     }      \/\/ \u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430     std::vector&lt;std::ostringstream&gt; thread_outputs(num_threads);     std::vector&lt;std::thread&gt; threads;     for (int i = 0; i &lt; num_threads; ++i) {         threads.emplace_back([&amp;, i]() {             process_file_chunk(chunks[i], thread_outputs[i]);         });     }     for (auto&amp; thread : threads) {         thread.join();     }      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432     std::ostringstream final_output;     for (auto&amp; oss : thread_outputs) {         final_output &lt;&lt; oss.str();     }     return final_output.str(); }  int main(int argc, char* argv[]) {     if (argc != 2) {         std::cerr &lt;&lt; \"Usage: \" &lt;&lt; argv[0] &lt;&lt; \" &lt;path_to_traverse&gt;\\n\";         return 1;     }     fs::path path(argv[1]);     if (!fs::exists(path) || !fs::is_directory(path)) {         std::cerr &lt;&lt; \"The provided path is not a directory or doesn't exist.\\n\";         return 1;     }      \/\/ \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439     std::string tree = generate_tree(path);      \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438     int num_threads = std::thread::hardware_concurrency();     if (num_threads &lt;= 0) num_threads = 4; \/\/ Fallback to 4 threads if hardware_concurrency() returns 0     std::string output = process_files_multithreaded(path, num_threads);      \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432     std::string final_output = tree + '\\n' + output;      \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b prompt.txt     fs::path prompt_file = path.parent_path() \/ \"prompt.txt\";     std::ofstream f(prompt_file);     if (!f.is_open()) {         std::cerr &lt;&lt; \"Error writing to prompt.txt\\n\";         return 1;     }     f.write(final_output.c_str(), final_output.size());     f.close();     std::cout &lt;&lt; \"prompt.txt has been created at \" &lt;&lt; prompt_file &lt;&lt; '\\n';      \/\/ \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 prompt.txt     std::ifstream infile(prompt_file);     if (!infile.is_open()) {         std::cerr &lt;&lt; \"Error reading prompt.txt for token counting\\n\";         return 1;     }     std::string content((std::istreambuf_iterator&lt;char&gt;(infile)), std::istreambuf_iterator&lt;char&gt;());     infile.close();      \/\/ \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (\u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c)     std::size_t token_count = 0;     bool in_token = false;     for (char c : content) {         if (std::isspace(static_cast&lt;unsigned char&gt;(c))) {             if (in_token) {                 ++token_count;                 in_token = false;             }         } else {             in_token = true;         }     }     if (in_token) ++token_count;      std::cout &lt;&lt; \"Number of tokens in prompt.txt: \" &lt;&lt; token_count &lt;&lt; '\\n';     return 0; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043a\u043e\u0434 \u0431\u044b\u043b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 Windows \u0432 WSL \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 MinGW64:<\/p>\n<pre><code>x86_64-w64-mingw32-g++ -static-libgcc -static-libstdc++ -o main64.exe cpp.cpp<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0442 OpenAI \u2014 <a href=\"https:\/\/github.com\/openai\/tiktoken\" rel=\"noopener noreferrer nofollow\">Tiktoken<\/a>. <a href=\"https:\/\/cookbook.openai.com\/examples\/how_to_count_tokens_with_tiktoken\" rel=\"noopener noreferrer nofollow\">Cookbook <\/a>\u043e\u0442 OpenAI \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tiktoken, \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e GPT-4o. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u043d \u043d\u0430 Python \u0438 Rust, \u0447\u0442\u043e<\/p>\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-445619","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445619","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=445619"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445619\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}