{"id":335488,"date":"2022-07-08T15:00:39","date_gmt":"2022-07-08T15:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=335488"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=335488","title":{"rendered":"<span>\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0431\u044b\u0441\u0442\u0440\u044b, \u043d\u043e \u0432\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435<\/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\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\"\/><\/div>\n<p>  \u041b\u044e\u0434\u0438 \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043c\u0430\u0441\u0441\u043e\u0439 10 \u043a\u0433 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043c\u0430\u0441\u0441\u043e\u0439 1 \u043a\u0433.<\/p>\n<p>  \u041e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0438\u0445 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043c\u043e\u0437\u0433\u0443.<\/p>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u0438 \u0432\u044b \u044d\u0442\u0438 \u0432\u0438\u0434\u0435\u043e?<\/p>\n<ol>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=i93Z7zljQ7I\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0412\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 3D<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=qSOVBiEotaw\">\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u0433\u0430\u0442\u0441\u0442\u0432\u043e \u0414\u0436\u0435\u0444\u0444\u0430 \u0411\u0435\u0437\u043e\u0441\u0430 \u0432 \u0440\u0438\u0441\u0435<\/a><\/li>\n<\/ol>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u044f \u0441\u044a\u0435\u0434\u0430\u044e \u043f\u043e \u0447\u0430\u0448\u043a\u0435 \u0440\u0438\u0441\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u0440\u044f\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0414\u0436\u0435\u0444\u0444\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e, \u043d\u043e \u0438 \u0441\u0432\u043e\u0438\u043c \u0436\u0435\u043b\u0443\u0434\u043a\u043e\u043c.<\/p>\n<p>  \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u0432\u043d\u0451\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u043a\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u043c\u043d\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u0418 \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0427\u0442\u043e \u043c\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c?<\/h3>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\"># \u0443\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 def aggregate(input_df):     weights = initialize_weights(len(input_df))       # input_df \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: timestamp, score \u0438 id     output_df = group_by_id(input_df)       # \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435     output_df = sort_by_time(output_df)      output_df = sort_by_score(output_df, desc=True)      # \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435     output_df = rank_within_id(output_df)      # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \"results\"     output_df = multiply_weights(output_df, weights)      results = results_sum_in_each_group(output_df)      return results # \u0441\u043f\u0438\u0441\u043e\u043a<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (Machine Learning, ML). \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430. \u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 500 \u043c\u0441, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d (\u0433\u0434\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 500 \u043c\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c 400-800 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438). \u041c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0435\u0451 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u0440\u0438\u043c. \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438 1000 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 10 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432).<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kt\/0z\/kv\/kt0zkvopm5kridqfhojdae9i1ec.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kt\/0z\/kv\/kt0zkvopm5kridqfhojdae9i1ec.png\"\/><\/div>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f 1000 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u043e 8 \u0441\u0435\u043a\u0443\u043d\u0434. \u041e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e. \u042f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u0435\u0435 20 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 1: \u043f\u0438\u0448\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0435\u0437 Pandas + \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/h3>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Pandas \u044f\u0437\u044b\u043a\u0430 Python \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u043e \u0443\u0436\u0430\u0441\u043d\u0430 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0415\u0441\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0435\u0451 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u0442\u043e \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0432\u0437\u0440\u043e\u0441\u043b\u0435\u0442\u044c. [\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u043d\u0435 \u043f\u043e\u0439\u043c\u0438\u0442\u0435 \u043c\u0435\u043d\u044f \u043d\u0435\u0432\u0435\u0440\u043d\u043e. Pandas \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0430 \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u043b\u0430 pandas. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Pandas. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c + \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0441\u0442\u0440\u043e\u043a, \u0442\u043e Pandas \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0447\u0438\u0441\u0442\u044b\u0439 Python. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 500 \u043c\u0441, \u0442\u043e \u0432\u044b \u043f\u0440\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0435 \u043d\u0430 \u0441\u0435\u0431\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 Pandas (\u0438 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0435 \u0442\u0440\u0430\u0442\u044b, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c).] \u042f \u0437\u0430\u043c\u0435\u043d\u0438\u043b Pandas \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 Python \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043e\u043d\u0430 \u0434\u0435\u043b\u0430\u043b\u0430 \u2014 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0442\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u042d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0438 \u044f \u043d\u0430\u0447\u0430\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<pre><code class=\"python\">WEIGHTS = initialize_weights(99999)  def aggregate_efficient(input_lists):     global WEIGHTS      # input_lists \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 2 \u0441\u043f\u0438\u0441\u043a\u0430     output_lists = algorithm_wizardry(input_lists)       # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \"results\"     output_lists = multiply_weights(output_lists, WEIGHTS)      results = results_sum_in_each_group(output_lists)      return results # \u0441\u043f\u0438\u0441\u043e\u043a aggregate_efficient(ip_list)<\/code><\/pre>\n<p>  \u0418 \u0442\u0435\u043f\u0435\u0440\u044c 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bi\/hu\/yk\/bihuykuvjzcg7kspefdzs5qeiuo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bi\/hu\/yk\/bihuykuvjzcg7kspefdzs5qeiuo.png\"\/><\/div>\n<p>  \u041c\u044b \u0441\u043d\u0438\u0437\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u0441 20 \u043c\u0438\u043d\u0443\u0442 \u0434\u043e 12 \u0441\u0435\u043a\u0443\u043d\u0434! \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0430 9900%.<\/p>\n<p>  \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c?<\/p>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 2: \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Cython<\/h3>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u0442\u0440\u044e\u043a\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 Python \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0451 \u043d\u0430 Cython. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>.pyx<\/code><br \/>  \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 <code>cdef<\/code> \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0432 \u043d\u0435\u0451 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f.\n<pre><code class=\"python\">def aggregate_efficient_cyth(double[:] score_array,                          double[:] time_array,                          double[:] weights):       results = algorithm_wizardry(score_array,                                   time_array, weights)     return results<\/code><\/pre>\n<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b setup.py\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 -O3 \u043e\u043f\u0430\u0441\u0435\u043d, \u043d\u043e \u043c\u044b \u043f\u043e\u0439\u0434\u0451\u043c \u0442\u0430\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c.<\/p>\n<pre><code class=\"python\">from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension from Cython.Distutils import build_ext   ext_modules = [         Extension(\"agg_cython\",             [\"agg_cython.pyx\"],             libraries=[\"m\"],             extra_compile_args = [\"-O3\", \"-ffast-math\", \"-march=native\", \"-fopenmp\" ],             extra_link_args=['-fopenmp'],             language=\"c++\")         ] setup(name=\"agg_cyth_pure\",cmdclass = {'build_ext': build_ext}, ext_modules=ext_modules,)<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u0418 \u0432\u043e\u0442 \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\"\/><\/div>\n<p>  \u041e\u043a\u043e\u043b\u043e <code>6,59<\/code> \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 82%. \u041d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435!<\/p>\n<p>  \u041d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u044b \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c \u0442\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435 \u0431\u0435\u0437\u0443\u043c\u0438\u0435.<\/p>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 3: \u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C++<\/h3>\n<p>  \u0412\u043e\u0442 \u0442\u0443\u0442-\u0442\u043e \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u0435\u043b\u044c\u0435. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0439 \u0432 \u0441\u0432\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 (\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <a href=\"https:\/\/ragv.in\/\">\u0420\u0430\u0433\u0441\u0443<\/a>), \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430, \u0442\u043e \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e:<\/p>\n<ol>\n<li>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C++\n<pre><code class=\"cpp\">#include \"agg_cyth_fast.hpp\"  using namespace std;  double agg_efficient(double score_array[],                      long time_array[],                     double weight_lookup[],                     int N){      vector&lt;double> results = algorithm_wizardry(score_array,                                    time_array, weight_lookup, N);     return results; }<\/code><\/pre>\n<\/li>\n<li>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\n<pre><code class=\"cpp\">#ifndef AGG_H #define AGG_H  #include &lt;iostream> #include &lt;map> #include &lt;vector> #include &lt;algorithm>  double agg_efficient(double[], long[], double[], int); #endif<\/code><\/pre>\n<\/li>\n<li>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0430\u0439\u043b <code>.pyx<\/code> \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 C++\n<pre><code class=\"python\">import numpy as np from math import exp  from libc.math cimport exp as c_exp from cython.parallel import prange cimport cython   cdef extern from \"agg_cyth_fast.hpp\" nogil:     double agg_efficient(double[], long[], double[], int)  def agg_efficient_fs(double[:] score_array,                        long[:] time_array,                          double[:] weight_lookup):     cdef int N = len(time_array)     cdef double Y;     Y = agg_efficient(&amp;score_array[0],                        &amp;time_array[0],                         &amp;weight_lookup[0], N);     return Y<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b setup.py, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b Python \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C++.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ec\/vm\/xj\/ecvmxjyylsgkkvzdh-pgcf4yjmm.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ec\/vm\/xj\/ecvmxjyylsgkkvzdh-pgcf4yjmm.png\"\/><\/div>\n<p>  \u0427\u0438\u0441\u0442\u044b\u0439 C++ \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u0443\u043c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c. \u041c\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 119%!<\/p>\n<p>  \u041d\u043e \u043c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u0427\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0444\u0430\u0439\u043b\u0430 .pyx \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u043e\u043a\u0440\u044b\u0442\u0430, \u043d\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430\u043c.<\/p>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 4: \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c Global Interpreter Lock (GIL)<\/h3>\n<p>  \u0412 Python \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0449\u044c \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c GIL, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 Python \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443\u0436 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043d\u0430\u043f\u0440\u044f\u0447\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0442\u043e \u0437\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u044f\u0434\u0440\u043e?<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/cython.readthedocs.io\/en\/latest\/src\/userguide\/parallelism.html\">prange<\/a> \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b <code>.pyx<\/code>:<\/p>\n<pre><code class=\"python\">@cython.boundscheck(False) @cython.wraparound(False) def agg_efficient_fs_batch(double[:,:] score_array,                              long[:,:] time_array,                              double[:] weight_lookup):     cdef int M = len(score_array)     cdef double[:] Y = np.zeros(M)     cdef int i, N     for i in prange(M, nogil=True):         N = len(time_array[i])         Y[i] = agg_efficient(&amp;score_array[i][0],                               &amp;time_array[i][0],                               &amp;weight_lookup[0], N);     return Y<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0442 \u0436\u0435 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kp\/e4\/mt\/kpe4mtn_3exffrs2xihd0u-5lds.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kp\/e4\/mt\/kpe4mtn_3exffrs2xihd0u-5lds.png\"\/><\/div>\n<p>  \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 237% \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<h3>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433 \u0434\u043b\u044f 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/h3>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/th>\n<th>\u041f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/th>\n<th>\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u041d\u0435\u0442<\/td>\n<td>1200 \u0441<\/td>\n<td>&#8212;<\/td>\n<\/tr>\n<tr>\n<td>\u0418\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 Pandas + \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/td>\n<td>12 \u0441<\/td>\n<td>\u043e\u043a\u043e\u043b\u043e 9 900%<\/td>\n<\/tr>\n<tr>\n<td>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Cython<\/td>\n<td>6,59 \u0441<\/td>\n<td>\u043e\u043a\u043e\u043b\u043e 18 109,4%<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C++<\/td>\n<td>3 c<\/td>\n<td>\u043e\u043a\u043e\u043b\u043e 33 326,2%<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 C++ \u043d\u0430 4 \u044f\u0434\u0440\u0430\u0445<\/td>\n<td>890 \u043c\u0441<\/td>\n<td>\u043e\u043a\u043e\u043b\u043e 134 731%<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 C++ \u043d\u0430 32 \u044f\u0434\u0440\u0430\u0445<\/td>\n<td>201 \u043c\u0441<\/td>\n<td>\u043e\u043a\u043e\u043b\u043e 596 915%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/company\/sportmaster_lab\/blog\/675880\/\"> https:\/\/habr.com\/ru\/company\/sportmaster_lab\/blog\/675880\/<\/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\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9s\/kf\/6r\/9skf6r896ppkllkedowl2_kdbhy.png\"\/><\/div>\n<p>  \u041b\u044e\u0434\u0438 \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043c\u0430\u0441\u0441\u043e\u0439 10 \u043a\u0433 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043c\u0430\u0441\u0441\u043e\u0439 1 \u043a\u0433.<\/p>\n<p>  \u041e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0438\u0445 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043c\u043e\u0437\u0433\u0443.<\/p>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u0438 \u0432\u044b \u044d\u0442\u0438 \u0432\u0438\u0434\u0435\u043e?<\/p>\n<ol>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=i93Z7zljQ7I\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0412\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 3D<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=qSOVBiEotaw\">\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u0433\u0430\u0442\u0441\u0442\u0432\u043e \u0414\u0436\u0435\u0444\u0444\u0430 \u0411\u0435\u0437\u043e\u0441\u0430 \u0432 \u0440\u0438\u0441\u0435<\/a><\/li>\n<\/ol>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u044f \u0441\u044a\u0435\u0434\u0430\u044e \u043f\u043e \u0447\u0430\u0448\u043a\u0435 \u0440\u0438\u0441\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u0440\u044f\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0414\u0436\u0435\u0444\u0444\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e, \u043d\u043e \u0438 \u0441\u0432\u043e\u0438\u043c \u0436\u0435\u043b\u0443\u0434\u043a\u043e\u043c.<\/p>\n<p>  \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u0432\u043d\u0451\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u043a\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u043c\u043d\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u0418 \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\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-335488","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335488","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=335488"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335488\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}