{"id":354670,"date":"2024-05-20T22:53:00","date_gmt":"2024-05-20T22:53:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354670"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354670","title":{"rendered":"<span>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ev\/cj\/gt\/evcjgta9imcuvfpzrgzf1af8hvo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ev\/cj\/gt\/evcjgta9imcuvfpzrgzf1af8hvo.png\"\/><\/p>\n<blockquote><p><font color=\"grey\"><i><b>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/i>: \u0410\u0440\u0442\u0435\u043c \u041c\u0438\u0445\u0430\u0439\u043b\u043e\u0432<\/font><\/p><\/blockquote>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0436\u0438\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0434\u043e \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0411\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u044b\u043c\u0438 \u043d\u0430 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0447\u0435\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0435\u0442\u043e\u043a \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445, \u043d\u043e \u0438 \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0430, \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0445\u043e\u0437\u044f\u0439\u0441\u0442\u0432\u043e \u0438 \u044d\u043a\u043e\u043b\u043e\u0433\u0438\u044f.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043b\u0438\u043c\u0430\u0442\u0435 \u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0438\u0449\u0438 \u043f\u043e\u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435 \u044d\u0442\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u0440\u043e\u0433\u0438, \u043e\u043f\u0430\u0441\u043d\u044b \u0438\u043b\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b. \u042d\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u043f\u0440\u0438\u0440\u043e\u0434\u0435, \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u042d\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u0447\u0435\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u043e \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 Python \u0438 \u0435\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>  <b>1. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f:<\/b> \u0411\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b, \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0441\u043c\u0435\u0440\u0442\u043d\u043e\u0441\u0442\u044c, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b>2. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f:<\/b> \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u042d\u0442\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  <b>3. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/b> \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u0430\u043c\u0438. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u2014 \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <b>4. \u0412\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f:<\/b> \u041c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c) \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u044b (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c). \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u044d\u0442\u0430\u043f, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>  <b>5. \u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432:<\/b> \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  Python \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0431\u043e\u0433\u0430\u0442\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c:<\/p>\n<p>  <b>1. NumPy:<\/b> NumPy \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. NumPy \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\">import numpy as np  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 arr = np.array([1, 2, 3, 4, 5])  # \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c squared_arr = arr**2  print(squared_arr)<\/code><\/pre>\n<p>  <b>2. SciPy:<\/b> SciPy \u2014 \u044d\u0442\u043e \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0430\u0434 NumPy, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<pre><code class=\"python\">from scipy.integrate import solve_ivp  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f def population_growth(t, y):     return 0.1 * y  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f initial_population = [100]  # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f solution = solve_ivp(population_growth, [0, 10], initial_population, t_eval=np.arange(0, 10, 0.1))  print(solution.y[0])<\/code><\/pre>\n<p>  <b>3. Biopython:<\/b> Biopython \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0431\u0438\u043e\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0438. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0414\u041d\u041a, \u0420\u041d\u041a \u0438 \u0431\u0435\u043b\u043a\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u043b\u0435\u043a\u0443\u043b.<\/p>\n<pre><code class=\"python\">from Bio import SeqIO  # \u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0414\u041d\u041a \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 record = SeqIO.read(\"sequence.fasta\", \"fasta\") print(record.seq)<\/code><\/pre>\n<p>  <b>4. OpenMM:<\/b> OpenMM \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u0442\u043e\u043c\u043e\u0432 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0431\u0435\u043b\u043a\u0438 \u0438 \u0414\u041d\u041a.<\/p>\n<pre><code class=\"python\">from simtk.openmm.app import * from simtk.openmm import * from simtk.unit import *  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u0446 system = System() system.addParticle(1.0 * amu) system.addParticle(2.0 * amu)  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u0430 force = CustomBondForce(\"k * (r - r0)^2\") force.addGlobalParameter(\"k\", 100.0 * kilojoules_per_mole \/ nanometer**2) force.addGlobalParameter(\"r0\", 0.1 * nanometer) force.addBond(0, 1)  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0442\u043e\u0440\u0430 integrator = VerletIntegrator(0.001 * picoseconds)  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 simulation = Simulation(Topology(), system, integrator)  # \u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 simulation.context.setPositions([[0, 0, 0], [1, 0, 0]]) simulation.step(1000)<\/code><\/pre>\n<p>  <b>5. Matplotlib:<\/b> Matplotlib \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u043e\u0447\u043d\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">import matplotlib.pyplot as plt  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 x = np.linspace(0, 10, 100) y = np.sin(x)  # \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.plot(x, y) plt.xlabel(\"\u0412\u0440\u0435\u043c\u044f\") plt.ylabel(\"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435\") plt.title(\"\u0413\u0440\u0430\u0444\u0438\u043a \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b\") plt.show()<\/code><\/pre>\n<p>  \u042d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043b\u0438\u0448\u044c \u043c\u0430\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Python \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Python.<\/p>\n<h1>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u043a<\/h1>\n<p>  <b>\u041c\u043e\u0434\u0435\u043b\u044c \u041b\u043e\u0442\u043a\u0438-\u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u044b<\/b>, \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u0445\u0438\u0449\u043d\u0438\u043a-\u0436\u0435\u0440\u0442\u0432\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u044f\u043c\u0438 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432 \u0432 \u044d\u043a\u043e\u043b\u043e\u0433\u0438\u0438. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0412\u0438\u0442\u043e \u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u043e\u0439 \u0438 \u0410\u043b\u044c\u0444\u0440\u0435\u0434\u043e\u043c \u041b\u043e\u0442\u043a\u043e\u0439 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 20-\u0433\u043e \u0432\u0435\u043a\u0430 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432: \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0438 \u0436\u0435\u0440\u0442\u0432.<\/p>\n<p>  \u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ul>\n<li>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u043e\u043b\u0438\u043a\u043e\u0432).<\/li>\n<li>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u0438\u0441).<\/li>\n<li>C\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0431\u0435\u0437 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432.<\/li>\n<li>C\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0445\u043e\u0442\u044f\u0442\u0441\u044f \u043d\u0430 \u0436\u0435\u0440\u0442\u0432.<\/li>\n<li>C\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0438\u0445 \u0434\u043e\u0431\u044b\u0447\u0443.<\/li>\n<li>C\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u0438\u0449\u0438.<\/li>\n<\/ul>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u041b\u043e\u0442\u043a\u0438-\u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NumPy. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<pre><code class=\"python\">import numpy as np import matplotlib.pyplot as plt  # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u041b\u043e\u0442\u043a\u0438-\u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u044b r = 0.1  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0436\u0435\u0440\u0442\u0432 \u0431\u0435\u0437 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 a = 0.02  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043e\u0445\u043e\u0442\u044f\u0442\u0441\u044f \u043d\u0430 \u0436\u0435\u0440\u0442\u0432 b = 0.3  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u044b\u0447\u0443 m = 0.01  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0438\u0449\u0438  # \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b dt = 0.001  # \u0428\u0430\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t_max = 100  # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f N0 = 40  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 P0 = 9   # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 num_steps = int(t_max \/ dt) + 1 N = np.zeros(num_steps) P = np.zeros(num_steps) time = np.linspace(0, t_max, num_steps)  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 def compute_derivatives(N, P):     dNdt = r * N - a * N * P     dPdt = -b * P + m * N * P     return dNdt, dPdt  # \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u0443\u0449\u0435\u043d\u0438\u0439 for i in range(num_steps - 1):     dNdt, dPdt = compute_derivatives(N[i], P[i])          # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u0443\u0449\u0435\u043d\u0438\u044f     noise_N = np.random.normal(0, 0.1)     noise_P = np.random.normal(0, 0.1)          N[i + 1] = N[i] + (dNdt + noise_N) * dt     P[i + 1] = P[i] + (dPdt + noise_P) * dt  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 plt.figure(figsize=(12, 6)) plt.plot(time, N, label='\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 (N)') plt.plot(time, P, label='\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 (P)') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c') plt.title('\u041c\u043e\u0434\u0435\u043b\u044c \u041b\u043e\u0442\u043a\u0438-\u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u044b \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438') plt.legend() plt.grid(True) plt.show()<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>compute_derivatives<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/p1\/z4\/fk\/p1z4fkurg60e5wakrhrfpoo3638.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/p1\/z4\/fk\/p1z4fkurg60e5wakrhrfpoo3638.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0434\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f\u043c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0438 \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u044d\u0442\u0438 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0435\u0439 \u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439.<\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0435\u0439 \u2014 <b>\u043c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b<\/b>. \u041c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0440\u0435\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0432 \u044d\u043a\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f\u044b: \u0445\u0438\u0449\u043d\u0438\u043a\u0438, \u0436\u0435\u0440\u0442\u0432\u044b \u0438 \u043f\u0438\u0449\u0430 (\u0434\u043e\u0431\u044b\u0447\u0430).<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b:  <\/p>\n<ul>\n<li>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/li>\n<li>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/li>\n<li>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u044b\u0447\u0438 (\u043f\u0438\u0449\u0438) \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/li>\n<li>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432 \u0431\u0435\u0437 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432.<\/li>\n<li>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043e\u0445\u043e\u0442\u044f\u0442\u0441\u044f \u043d\u0430 \u0436\u0435\u0440\u0442\u0432.<\/li>\n<li>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u044b\u0447\u0443.<\/li>\n<li>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0438\u0449\u0438.<\/li>\n<li>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u044b\u0447\u0438 \u0432 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u044b\u0447\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0445\u0438\u0449\u043d\u0438\u043a\u0430).<\/li>\n<\/ul>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b \u0432 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NumPy \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<pre><code class=\"python\">import numpy as np import matplotlib.pyplot as plt  # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0421\u0438\u0441\u0441\u0435\u0440\u044b r = 0.1  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0436\u0435\u0440\u0442\u0432 \u0431\u0435\u0437 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 a = 0.02  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043e\u0445\u043e\u0442\u044f\u0442\u0441\u044f \u043d\u0430 \u0436\u0435\u0440\u0442\u0432 b = 0.3  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0438\u0449\u043d\u0438\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u044b\u0447\u0443 c = 0.01  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0438\u0449\u0438 e = 0.1   # \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u044b\u0447\u0438 \u0432 \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u044b\u0447\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0445\u0438\u0449\u043d\u0438\u043a\u0430)  # \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b dt = 0.001  # \u0428\u0430\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t_max = 100  # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f N0 = 40  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 P0 = 9   # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 F0 = 200 # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u044b\u0447\u0438  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u0440\u0442\u0432, \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0438 \u0434\u043e\u0431\u044b\u0447\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 num_steps = int(t_max \/ dt) + 1 N = np.zeros(num_steps) P = np.zeros(num_steps) F = np.zeros(num_steps) time = np.linspace(0, t_max, num_steps)  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 def compute_derivatives(N, P, F):     dNdt = r * N - a * N * P - b * N * F     dPdt = -c * P + e * a * N * P     dFdt = -b * F + e * a * N * P     return dNdt, dPdt, dFdt  # \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u0443\u0449\u0435\u043d\u0438\u0439 for i in range(num_steps - 1):     dNdt, dPdt, dFdt = compute_derivatives(N[i], P[i], F[i])          # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u0443\u0449\u0435\u043d\u0438\u044f     noise_N = np.random.normal(0, 0.1)     noise_P = np.random.normal(0, 0.1)     noise_F = np.random.normal(0, 0.1)          N[i + 1] = N[i] + (dNdt + noise_N) * dt     P[i + 1] = P[i] + (dPdt + noise_P) * dt     F[i + 1] = F[i] + (dFdt + noise_F) * dt  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 plt.figure(figsize=(12, 6)) plt.plot(time, N, label='\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u0440\u0442\u0432 (N)') plt.plot(time, P, label='\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 (P)') plt.plot(time, F, label='\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u044b\u0447\u0438 (F)') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c') plt.title('\u041c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438') plt.legend() plt.grid(True) plt.show()<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0421\u0438\u0441\u0441\u0435\u0440\u044b, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u041c\u043e\u0434\u0435\u043b\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439: \u0436\u0435\u0440\u0442\u0432, \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u0438 \u0434\u043e\u0431\u044b\u0447\u0438 (\u043f\u0438\u0449\u0438). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u0438 \u0442\u0440\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u043a\u0430\u043a \u0438\u0445 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/jz\/5v\/ga\/jz5vgamsxn7bf76zkzo7h3fmirg.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/jz\/5v\/ga\/jz5vgamsxn7bf76zkzo7h3fmirg.jpeg\" data-blurred=\"true\"\/><br \/>  \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430, \u0447\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u041b\u043e\u0442\u043a\u0438-\u0412\u043e\u043b\u044c\u0442\u0435\u0440\u0440\u044b, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <a href=\"https:\/\/otus.pw\/yruH\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jt\/gl\/uw\/jtgluwzk-dmheaqhrc-ww6shkhy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jt\/gl\/uw\/jtgluwzk-dmheaqhrc-ww6shkhy.png\"\/><br \/>  <\/a><\/p>\n<h1>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u0439<\/h1>\n<p>  \u0418\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e, \u0433\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u043e\u043b\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u0439: \u043c\u043e\u0434\u0435\u043b\u044c SIR (Susceptible-Infectious-Recovered) \u0438 \u043c\u043e\u0434\u0435\u043b\u044c SEIR (Susceptible-Exposed-Infectious-Recovered).<\/p>\n<h3>\u041c\u043e\u0434\u0435\u043b\u044c SIR (Susceptible-Infectious-Recovered)<\/h3>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c SIR \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u0439. \u041e\u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0442\u0440\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: \u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0435 (S \u2014 Susceptible), \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 (I \u2014 Infectious) \u0438 \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0435 (R \u2014 Recovered). \u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445:  <\/p>\n<ul>\n<li>\u0412\u0441\u0435 \u043e\u0441\u043e\u0431\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 S.<\/li>\n<li>\u0418\u043d\u0444\u0435\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a \u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u043c.<\/li>\n<li>\u0418\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u044b\u0437\u0434\u043e\u0440\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0442 \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e R.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"python\">   from scipy.integrate import solve_ivp    import numpy as np    import matplotlib.pyplot as plt    from Bio import Phylo     # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438    beta = 0.3  # \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u0438    gamma = 0.1  # \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u043b\u0435\u043d\u0438\u044f     # \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b    t_start = 0    t_end = 200    t_interval = (t_start, t_end)     # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f    S0 = 0.9  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0445    I0 = 0.1  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445    R0 = 0.0  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0445     # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 SIR    def sir_model(t, y):        S, I, R = y        dSdt = -beta * S * I        dIdt = beta * S * I - gamma * I        dRdt = gamma * I        return [dSdt, dIdt, dRdt]     # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e solve_ivp    sol = solve_ivp(sir_model, t_interval, [S0, I0, R0], t_eval=np.linspace(t_start, t_end, 1000))     # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432    plt.figure(figsize=(12, 6))    plt.plot(sol.t, sol.y[0], label='\u0412\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0435 (S)')    plt.plot(sol.t, sol.y[1], label='\u0418\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 (I)')    plt.plot(sol.t, sol.y[2], label='\u0412\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0435 (R)')    plt.xlabel('\u0412\u0440\u0435\u043c\u044f')    plt.ylabel('\u0414\u043e\u043b\u044f \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f')    plt.title('\u041c\u043e\u0434\u0435\u043b\u044c SIR \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u0438')    plt.legend()    plt.grid(True)    plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/8f\/4r\/pn\/8f4rpnz63eu3jmdh-emtx8z8w4a.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/8f\/4r\/pn\/8f4rpnz63eu3jmdh-emtx8z8w4a.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f SIR \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>solve_ivp <\/code>\u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SciPy \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043e\u043b\u0438 \u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0445, \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0445 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h3>\u041c\u043e\u0434\u0435\u043b\u044c SEIR (Susceptible-Exposed-Infectious-Recovered)<\/h3>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c SEIR \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c SIR, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 (E \u2014 Exposed), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u0439 \u0441 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u0446\u0430 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">   from scipy.integrate import solve_ivp    import numpy as np    import matplotlib.pyplot as plt     # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438    beta = 0.3  # \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u0438    sigma = 0.2  # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0438\u0437 E \u0432 I    gamma = 0.1  # \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u043b\u0435\u043d\u0438\u044f     # \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b    t_start = 0    t_end = 200    t_interval = (t_start, t_end)     # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f    S0 = 0.9  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0445    E0 = 0.1  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445    I0 = 0.0  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445    R0 = 0.0  # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0445     # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 SEIR    def seir_model(t, y):        S, E, I, R = y        dSdt = -beta * S * I        dEdt = beta * S * I - sigma * E        dIdt = sigma * E - gamma * I        dRdt = gamma * I        return [dSdt, dEdt, dIdt, dRdt]     # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e solve_ivp    sol = solve_ivp(seir_model, t_interval, [S0, E0, I0, R0], t_eval=np.linspace(t_start, t_end, 1000))     # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432    plt.figure(figsize=(12, 6))    plt.plot(sol.t, sol.y[0], label='\u0412\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u044b\u0435 (S)')    plt.plot(sol.t, sol.y[1], label='\u042d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 (E)')    plt.plot(sol.t, sol.y[2], label='\u0418\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 (I)')    plt.plot(sol.t, sol.y[3], label='\u0412\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0435 (R)')    plt.xlabel('\u0412\u0440\u0435\u043c\u044f')    plt.ylabel('\u0414\u043e\u043b\u044f \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f')    plt.title('\u041c\u043e\u0434\u0435\u043b\u044c SEIR \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u0438 \u0441 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c')    plt.legend()    plt.grid(True)    plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/lj\/nu\/lt\/ljnultyukvpssu9tiwlcltezqzs.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/lj\/nu\/lt\/ljnultyukvpssu9tiwlcltezqzs.jpeg\" data-blurred=\"true\"\/><br \/>  \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043c\u043e\u0434\u0435\u043b\u0438 SIR, \u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041c\u043e\u0434\u0435\u043b\u044c SEIR \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<h1>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439<\/h1>\n<p>  \u0413\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0433\u0435\u043d\u0430\u043c\u0438 \u0438 \u0431\u0435\u043b\u043a\u0430\u043c\u0438 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0435. \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0433\u0435\u043d\u044b \u0438 \u0431\u0435\u043b\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u0438 \u043a\u0430\u043a \u044d\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435, \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0446\u0438\u044f \u0433\u0435\u043d\u043e\u0432. <\/p>\n<p>  \u0413\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0433\u0440\u0430\u0444\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0437\u043b\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u0435\u043d\u044b \u0438\u043b\u0438 \u0431\u0435\u043b\u043a\u0438, \u0430 \u0440\u0435\u0431\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>  <b>1. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/b> \u042d\u0442\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0431\u0435\u043b\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0444\u0435\u0440\u043c\u0435\u043d\u0442\u043e\u043c \u0438 \u0435\u0433\u043e \u0441\u0443\u0431\u0441\u0442\u0440\u0430\u0442\u043e\u043c.<\/p>\n<p>  <b>2. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: <\/b>\u042d\u0442\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0433\u0435\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u0431\u0435\u043b\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0441\u0445\u043e\u0436\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0435\u0442\u043a\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0413\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b.<\/p>\n<p>  <i><b>NetworkX<\/b><\/i> \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Python \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0440\u0430\u0444\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0440\u0430\u0444\u043e\u0432, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NetworkX, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0435 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"bash\">pip install networkx<\/code><\/pre>\n<p>  C\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444 \u0433\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0438 \u0440\u0435\u0431\u0440\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0438 \u0433\u0435\u043d\u0430, \u0438 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<pre><code class=\"python\">import networkx as nx import matplotlib.pyplot as plt  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444 gene_network = nx.Graph()  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0443\u0437\u043b\u044b (\u0433\u0435\u043d\u044b) gene_network.add_node(\"GeneA\") gene_network.add_node(\"GeneB\") gene_network.add_node(\"GeneC\")  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0431\u0440\u0430 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f) gene_network.add_edge(\"GeneA\", \"GeneB\") gene_network.add_edge(\"GeneB\", \"GeneC\")  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0430 pos = nx.spring_layout(gene_network, seed=42)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 nx.draw(gene_network, pos, with_labels=True  , node_size=500, node_color=\"skyblue\", font_size=10, font_color=\"black\", font_weight=\"bold\", width=2, edge_color=\"gray\") plt.title(\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444 \u0433\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438\") plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/pm\/to\/wk\/pmtowk2c81pkusnd27khy4fqigy.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/pm\/to\/wk\/pmtowk2c81pkusnd27khy4fqigy.jpeg\" data-blurred=\"true\"\/><br \/>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0443\u0437\u043b\u044b (\u0433\u0435\u043d\u044b) \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0440\u0435\u0431\u0440\u0430 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f). \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0433\u0440\u0430\u0444 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Matplotlib.<\/p>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u044b \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0412\u0430\u0436\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<p>  <b>1. \u0421\u0442\u0435\u043f\u0435\u043d\u044c \u0443\u0437\u043b\u043e\u0432 (Node Degree):<\/b> \u042d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u044f\u0437\u0435\u0439 (\u0440\u0435\u0431\u0435\u0440), \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0443\u0437\u043b\u043e\u043c. \u042d\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0433\u0435\u043d\u044b \u0438\u043b\u0438 \u0431\u0435\u043b\u043a\u0438 \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<p>  <b>2. \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c (Centrality):<\/b> \u042d\u0442\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u0435\u043b \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0432 \u0433\u0440\u0430\u0444\u0435. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0443 (Betweenness Centrality) \u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 (Closeness Centrality).<\/p>\n<p>  <b>3. \u041a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f (Clustering):<\/b> \u042d\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0443\u0437\u043b\u044b \u0432 \u0433\u0440\u0430\u0444\u0435. \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u0433\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"python\"># \u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0433\u0440\u0430\u0444\u0430 degree_centrality = nx.degree_centrality(gene_network) betweenness_centrality = nx.betweenness_centrality(gene_network) closeness_centrality = nx.closeness_centrality(gene_network) clustering_coefficient = nx.clustering(gene_network)  # \u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 for node in gene_network.nodes:     print(f\"\u0423\u0437\u0435\u043b: {node}\")     print(f\"\u0421\u0442\u0435\u043f\u0435\u043d\u044c \u0443\u0437\u043b\u0430: {degree_centrality[node]}\")     print(f\"\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0443: {betweenness_centrality[node]}\")     print(f\"\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438: {closeness_centrality[node]}\")     print(f\"\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438: {clustering_coefficient[node]}\")     print(\"-\" * 30)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/2x\/5r\/nf\/2x5rnfy_kfwfgarnkk4xw_wc1ly.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/2x\/5r\/nf\/2x5rnfy_kfwfgarnkk4xw_wc1ly.jpeg\" data-blurred=\"true\"\/><br \/>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0433\u0440\u0430\u0444\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430. \u042d\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0433\u0435\u043d\u044b \u0438\u043b\u0438 \u0431\u0435\u043b\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0432 \u0433\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 <b>\u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/b> \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0438 \u0438\u0445 \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NetworkX:<\/p>\n<h3>\u0413\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0432 \u0434\u0440\u043e\u0436\u0436\u0430\u0445 (Saccharomyces cerevisiae)<\/h3>\n<p>  \u0414\u0440\u043e\u0436\u0436\u0438 (Saccharomyces cerevisiae) \u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0432 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438. \u0413\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0434\u0440\u043e\u0436\u0436\u0435\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0438\u0445 \u0433\u0435\u043d\u0430\u043c\u0438 \u0438 \u0431\u0435\u043b\u043a\u0430\u043c\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0433\u0435\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u0440\u043e\u0436\u0436\u0435\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0435\u0435:<\/p>\n<pre><code class=\"python\">import networkx as nx import matplotlib.pyplot as plt  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444 yeast_gene_network = nx.Graph()  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0443\u0437\u043b\u044b (\u0433\u0435\u043d\u044b) yeast_genes = [\"YGR198W\", \"YPL248C\", \"YDR277C\", \"YBR118W\", \"YPL268W\"] yeast_gene_network.add_nodes_from(yeast_genes)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0431\u0440\u0430 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f) yeast_gene_network.add_edge(\"YGR198W\", \"YPL248C\") yeast_gene_network.add_edge(\"YPL248C\", \"YDR277C\") yeast_gene_network.add_edge(\"YBR118W\", \"YPL268W\")  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0430 pos = nx.spring_layout(yeast_gene_network, seed=42)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 nx.draw(yeast_gene_network, pos, with_labels=True, node_size=500, node_color=\"skyblue\",         font_size=10, font_color=\"black\", font_weight=\"bold\", width=2, edge_color=\"gray\") plt.title(\"\u0413\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0434\u0440\u043e\u0436\u0436\u0435\u0439\") plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/t9\/gi\/of\/t9giofa7-7t69n7rmywalkpa80s.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/t9\/gi\/of\/t9giofa7-7t69n7rmywalkpa80s.jpeg\" data-blurred=\"true\"\/><br \/>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0433\u0435\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u0440\u043e\u0436\u0436\u0435\u0439 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 (\u0433\u0435\u043d\u0430\u043c\u0438) \u0438 \u0440\u0435\u0431\u0440\u0430\u043c\u0438 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438) \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0435\u0442\u0438.<\/p>\n<h3>\u0413\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430<\/h3>\n<p>  \u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u2014 \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0438 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0433\u0435\u043d\u043e\u0432 \u0438 \u0431\u0435\u043b\u043a\u043e\u0432 \u0432 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0435. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0435\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c (\u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430), \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u0434\u0433\u0440\u0430\u0444, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b:<\/p>\n<pre><code class=\"python\">import networkx as nx import matplotlib.pyplot as plt  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444 human_gene_network = nx.Graph()  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0443\u0437\u043b\u044b (\u0433\u0435\u043d\u044b) human_genes = [\"TP53\", \"BRCA1\", \"EGFR\", \"CDH1\", \"KRAS\"] human_gene_network.add_nodes_from(human_genes)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0431\u0440\u0430 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f) human_gene_network.add_edge(\"TP53\", \"BRCA1\") human_gene_network.add_edge(\"EGFR\", \"CDH1\") human_gene_network.add_edge(\"CDH1\", \"KRAS\")  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0430 pos = nx.spring_layout(human_gene_network, seed=42)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 nx.draw(human_gene_network, pos, with_labels=True, node_size=500, node_color=\"skyblue\",         font_size=10, font_color=\"black\", font_weight=\"bold\", width=2, edge_color=\"gray\") plt.title(\"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0433\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430\") plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/m1\/qo\/2b\/m1qo2bhwjgjk-6iizdddz5ls9e0.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/m1\/qo\/2b\/m1qo2bhwjgjk-6iizdddz5ls9e0.jpeg\" data-blurred=\"true\"\/><br \/>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u0434\u0433\u0440\u0430\u0444 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0435\u043d\u043e\u0432 \u0438 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0433\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u044b\u0441\u044f\u0447\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0443\u0437\u043b\u043e\u0432 \u0438 \u0440\u0435\u0431\u0435\u0440. \u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u043e\u0441\u043d\u043e\u0432\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043c\u0438 \u0436\u0435.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Python, \u0443\u0447\u0435\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u044b.<\/p>\n<p>  <a href=\"https:\/\/otus.pw\/yruH\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qt\/mz\/yf\/qtmzyfwkrn1snee-zgcykifv7yq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qt\/mz\/yf\/qtmzyfwkrn1snee-zgcykifv7yq.png\"\/><\/a><\/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\/760546\/\"> https:\/\/habr.com\/ru\/articles\/760546\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ev\/cj\/gt\/evcjgta9imcuvfpzrgzf1af8hvo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ev\/cj\/gt\/evcjgta9imcuvfpzrgzf1af8hvo.png\"\/><\/p>\n<blockquote><p><font color=\"grey\"><i><b>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/i>: \u0410\u0440\u0442\u0435\u043c \u041c\u0438\u0445\u0430\u0439\u043b\u043e\u0432<\/font><\/p><\/blockquote>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0436\u0438\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0434\u043e \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0411\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u044b\u043c\u0438 \u043d\u0430 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0447\u0435\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0439, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0433\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0435\u0442\u043e\u043a \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445, \u043d\u043e \u0438 \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0430, \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0445\u043e\u0437\u044f\u0439\u0441\u0442\u0432\u043e \u0438 \u044d\u043a\u043e\u043b\u043e\u0433\u0438\u044f.<\/p>\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-354670","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354670","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=354670"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354670\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}