{"id":395845,"date":"2024-06-29T12:28:15","date_gmt":"2024-06-29T12:28:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=395845"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T12:28:15","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=395845","title":{"rendered":"<span>\u0424\u0440\u0430\u043a\u0442\u0430\u043b\u044b, \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0438 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\">\n<p>\u0424\u0440\u0430\u043a\u0442\u0430\u043b\u044b \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0437\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0432\u043e\u043b \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0430\u0441\u0449\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0438. \u0422\u0435 \u0440\u0430\u0441\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0432\u0435\u0442\u0432\u0438 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0437\u043e\u0440\u044b. \u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0424\u0440\u0430\u043a\u0442\u0430\u043b\u044b \u0432\u0430\u0436\u043d\u044b \u0438 \u0432 \u043d\u0430\u0443\u043a\u0435 \u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u2014 \u0446\u0435\u043d\u0442\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u2014 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u0440\u0443\u0433\u0443 \u0437\u0430\u0434\u0430\u0447 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u043e \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439.<\/p>\n<p>  <\/p>\n<h1 id=\"ideya\"><strong>\u0418\u0434\u0435\u044f<\/strong><\/h1>\n<p>  <\/p>\n<p>\u042f \u0445\u043e\u0447\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0438\u0441\u0443\u0435\u0442 \u0440\u0430\u0432\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u0417\u0430\u0442\u0435\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u044d\u0442\u0430 \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0438\u0441\u0443\u0435\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0440\u0443\u0436\u0443. \u0414\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0443\u0437\u043e\u0440\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wa\/r_\/_m\/war__monucfujnz2bvdykhi0bcq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wa\/r_\/_m\/war__monucfujnz2bvdykhi0bcq.png\"\/><br \/>  <em>\u042d\u0442\u043e\u0442 \u043d\u0430\u0431\u0440\u043e\u0441\u043e\u043a \u2014 \u0442\u0438\u043f \u0443\u0437\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c<\/em><\/p>\n<p>  <\/p>\n<h1 id=\"predstavlenie-izobrazheniya\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e \u043a\u0430\u043a \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u0446\u0432\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432 RGB. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/numpy.org\/install\/\">NumPy<\/a> \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u0430 <a href=\"https:\/\/pillow.readthedocs.io\/en\/latest\/installation.html\">Pillow<\/a> \u2014 \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/s-\/lu\/qi\/s-luqilo2zsp1kr6ykmzrwiihvm.png\" data-src=\"https:\/\/habrastorage.org\/webt\/s-\/lu\/qi\/s-luqilo2zsp1kr6ykmzrwiihvm.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x \u0440\u0430\u0432\u043d\u043e\u0435 3, \u0430 y \u2014 4, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <code>pixels[4][3]<\/code>.<\/p>\n<p>  <\/p>\n<h1 id=\"risuem-liniyu\">\u0420\u0438\u0441\u0443\u0435\u043c \u043b\u0438\u043d\u0438\u044e<\/h1>\n<p>  <\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0440\u0438\u0441\u0443\u0435\u0442 \u043b\u0438\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0443\u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u043e\u0432\u044b\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0438. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0437\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">import numpy as np from PIL import Image import math  def plot_line(from_coordinates, to_coordinates, thickness, colour, pixels):      # Figure out the boundaries of our pixel array     max_x_coordinate = len(pixels[0])     max_y_coordinate = len(pixels)      # The distances along the x and y axis between the 2 points     horizontal_distance = to_coordinates[1] - from_coordinates[1]     vertical_distance = to_coordinates[0] - from_coordinates[0]      # The total distance between the two points     distance =  math.sqrt((to_coordinates[1] - from_coordinates[1])**2 \\                 + (to_coordinates[0] - from_coordinates[0])**2)      # How far we will step forwards each time we colour in a new pixel     horizontal_step = horizontal_distance\/distance     vertical_step = vertical_distance\/distance      # At this point, we enter the loop to draw the line in our pixel array     # Each iteration of the loop will add a new point along our line     for i in range(round(distance)):          # These 2 coordinates are the ones at the center of our line         current_x_coordinate = round(from_coordinates[1] + (horizontal_step*i))         current_y_coordinate = round(from_coordinates[0] + (vertical_step*i))          # Once we have the coordinates of our point,          # we draw around the coordinates of size 'thickness'         for x in range (-thickness, thickness):             for y in range (-thickness, thickness):                 x_value = current_x_coordinate + x                 y_value = current_y_coordinate + y                  if (x_value > 0 and x_value &lt; max_x_coordinate and \\                     y_value > 0 and y_value &lt; max_y_coordinate):                     pixels[y_value][x_value] = colour  # Define the size of our image pixels = np.zeros( (500,500,3), dtype=np.uint8 )  # Draw a line plot_line([0,0], [499,499], 1, [255,200,0], pixels)  # Turn our pixel array into a real picture img = Image.fromarray(pixels)  # Show our picture, and save it img.show() img.save('Line.png')<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4i\/gy\/ps\/4igypsk-dojtwafyyxmpjr4jlxe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/4i\/gy\/ps\/4igypsk-dojtwafyyxmpjr4jlxe.png\"\/><br \/>  \u042f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0436\u0435\u043b\u0442\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u043f\u043e \u0443\u0433\u043b\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439<\/p>\n<p>  <\/p>\n<h1 id=\"treugolnik\">\u0422\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a<\/h1>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u043b\u0438\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438. \u041d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0432\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a.<\/p>\n<p>  <\/p>\n<p>\u0412\u0437\u044f\u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0438 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0432\u044b\u0441\u043e\u0442\u0443: h = \u00bd(\u221a3a).<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u0432\u044b\u0441\u043e\u0442\u0443, \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0438 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044f \u043c\u043e\u0433\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0433\u043e\u043b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0410 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>plot_line<\/code> \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u0442 \u043b\u0438\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0443\u0433\u043b\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def draw_triangle(center, side_length, thickness, colour, pixels):      # The height of an equilateral triangle is, h = \u00bd(\u221a3a)     # where 'a' is the side length     triangle_height = round(side_length * math.sqrt(3)\/2)      # The top corner     top = [center[0] - triangle_height\/2, center[1]]      # Bottom left corner     bottom_left = [center[0] + triangle_height\/2, center[1] - side_length\/2]      # Bottom right corner     bottom_right = [center[0] + triangle_height\/2, center[1] + side_length\/2]      # Draw a line between each corner to complete the triangle     plot_line(top, bottom_left, thickness, colour, pixels)     plot_line(top, bottom_right, thickness, colour, pixels)     plot_line(bottom_left, bottom_right, thickness, colour, pixels)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5w\/pr\/i5\/5wpri5l32wxwcoqcyg7dddtot-i.png\" data-src=\"https:\/\/habrastorage.org\/webt\/5w\/pr\/i5\/5wpri5l32wxwcoqcyg7dddtot-i.png\"\/><\/p>\n<p>  <\/p>\n<h1 id=\"generaciya-fraktala\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u0430<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439. \u042f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430 \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439\u00a0\u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e\u00a0\u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445, \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0432\u044b\u0447\u0438\u0442\u0430\u044f \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0438\u0437 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0430\u0440\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def rotate(coordinate, center_point, degrees):     # Subtract the point we are rotating around from our coordinate     x = (coordinate[0] - center_point[0])     y = (coordinate[1] - center_point[1])      # Python's cos and sin functions take radians instead of degrees     radians = math.radians(degrees)      # Calculate our rotated points      new_x = (x * math.cos(radians)) - (y * math.sin(radians))     new_y = (y * math.cos(radians)) + (x * math.sin(radians))      # Add back our offset we subtracted at the beginning to our rotated points     return [new_x + center_point[0], new_y + center_point[1]]<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/t-\/va\/ka\/t-vakaqwl5nmwalf2a2ldorwzow.png\" data-src=\"https:\/\/habrastorage.org\/webt\/t-\/va\/ka\/t-vakaqwl5nmwalf2a2ldorwzow.png\"\/><br \/>  \u0422\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u043c\u044b \u043f\u043e\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043d\u0430 35 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u043c\u043e\u0433\u0443 \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0434\u043e\u043f\u0438\u0441\u0430\u043b <code>draw_triangle<\/code> \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0440\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0434\u043b\u0438\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>shrink_side_by<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <em>draw_triangle<\/em> (\u0441\u0430\u043c\u0443 \u0441\u0435\u0431\u044f), \u0447\u0442\u043e\u0431\u044b \u0438\u0437 \u0446\u0435\u043d\u0442\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043c\u0435\u043d\u044c\u0448\u0435. \u0422\u0430\u043a \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u043c: \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>draw_triangle<\/em> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 <code>max_depth<\/code>. \u042d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def draw_triangle(center, side_length, degrees_rotate, thickness, colour, \\                   pixels, shrink_side_by, iteration, max_depth):      # The height of an equilateral triangle is, h = \u00bd(\u221a3a)      # where 'a' is the side length     triangle_height = side_length * math.sqrt(3)\/2      # The top corner     top = [center[0] - triangle_height\/2, center[1]]      # Bottom left corner     bottom_left = [center[0] + triangle_height\/2, center[1] - side_length\/2]      # Bottom right corner     bottom_right = [center[0] + triangle_height\/2, center[1] + side_length\/2]      if (degrees_rotate != 0):         top = rotate(top, center, degrees_rotate)         bottom_left = rotate(bottom_left, center, degrees_rotate)         bottom_right = rotate(bottom_right, center, degrees_rotate)      # Coordinates between each edge of the triangle     lines = [[top, bottom_left],[top, bottom_right],[bottom_left, bottom_right]]      line_number = 0      # Draw a line between each corner to complete the triangle     for line in lines:         line_number += 1          plot_line(line[0], line[1], thickness, colour, pixels)          # If we haven't reached max_depth, draw some new triangles         if (iteration &lt; max_depth and (iteration &lt; 1 or line_number &lt; 3)):             gradient = (line[1][0] - line[0][0]) \/ (line[1][1] - line[0][1])              new_side_length = side_length*shrink_side_by              # Center of the line of the traingle we are drawing             center_of_line = [(line[0][0] + line[1][0]) \/ 2, \\                               (line[0][1] + line[1][1]) \/ 2]              new_center = []             new_rotation = degrees_rotate              # Amount we need to rotate the traingle by             if (line_number == 1):                 new_rotation += 60             elif (line_number == 2):                 new_rotation -= 60             else:                 new_rotation += 180              # In an ideal world this would be gradient == 0,             # but due to floating point division we cannot             # ensure that this will always be the case             if (gradient &lt; 0.0001 and gradient > -0.0001):                 if (center_of_line[0] - center[0] > 0):                     new_center = [center_of_line[0] + triangle_height * \\                                  (shrink_side_by\/2), center_of_line[1]]                 else:                     new_center = [center_of_line[0] - triangle_height * \\                                   (shrink_side_by\/2), center_of_line[1]]              else:                  # Calculate the normal to the gradient of the line                 difference_from_center = -1\/gradient                  # Calculate the distance from the center of the line                 # to the center of our new traingle                 distance_from_center = triangle_height * (shrink_side_by\/2)                  # Calculate the length in the x direction,                  # from the center of our line to the center of our new triangle                 x_length = math.sqrt((distance_from_center**2)\/ \\                                      (1 + difference_from_center**2))                  # Figure out which way around the x direction needs to go                 if (center_of_line[1] &lt; center[1] and x_length > 0):                     x_length *= -1                  # Now calculate the length in the y direction                 y_length = x_length * difference_from_center                  # Offset the center of the line with our new x and y values                 new_center = [center_of_line[0] + y_length, \\                               center_of_line[1] + x_length]              draw_triangle(new_center, new_side_length, new_rotation, \\                           thickness, colour, pixels, shrink_side_by, \\                           iteration+1, max_depth)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kr\/oj\/s7\/krojs7qk05svtxzkvkhwwlqkaey.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kr\/oj\/s7\/krojs7qk05svtxzkvkhwwlqkaey.png\"\/><br \/>  <em>\u0424\u0440\u0430\u043a\u0442\u0430\u043b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>shrink_side_by = 1\/2<\/code> \u0438 <code>max_depth<\/code> = 2<\/em><\/p>\n<p>  <\/p>\n<h1 id=\"rezultaty\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h1>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>shrink_side_by<\/code> \u0438 <code>max_depth<\/code> \u0432 <code>draw_triangle<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0443\u0437\u043e\u0440\u044b \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0442 \u0444\u043e\u0440\u043c\u044b \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0432\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0449\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u0448\u0435\u0441\u0442\u0438\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/y0\/kg\/p7\/y0kgp7btc23nokdas7yz1pi24s0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/y0\/kg\/p7\/y0kgp7btc23nokdas7yz1pi24s0.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ag\/re\/c9\/agrec9_2nog5joxrrhlobrzpvtu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ag\/re\/c9\/agrec9_2nog5joxrrhlobrzpvtu.png\"\/><em>\u0424\u0440\u0430\u043a\u0442\u0430\u043b-\u0441\u043d\u0435\u0436\u0438\u043d\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 <code>draw_triangle<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0438\u0441\u0443\u0435\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u044c<\/em><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_k\/ii\/-g\/_kii-gbkspfalynmcziw5pfgxyi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/_k\/ii\/-g\/_kii-gbkspfalynmcziw5pfgxyi.png\"\/><br \/>  \u0414\u0440\u0443\u0433\u043e\u0435 \u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0422\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u043e\u0447\u043d\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043d\u0430\u0443\u043a\u0438 \u043e \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435 \u0438 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/BobbyElmes\/Triangular-Fractal-Generator---Python-\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u043b\u0443\u0447\u0448\u0435, \u0441\u0432\u044f\u0436\u0438\u0442\u0435\u0441\u044c \u0441\u043e \u043c\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_280323&amp;utm_term=conc\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rz\/4h\/ne\/rz4hnexx9lidivxbzuaheff5usq.png\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rz\/4h\/ne\/rz4hnexx9lidivxbzuaheff5usq.png\"\/><\/a><\/p>\n<p>  <\/p>\n<ul>\n<li><u><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_280323&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u00ab\u0411\u0435\u043b\u044b\u0439 \u0445\u0430\u043a\u0435\u0440\u00bb (13 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/u><\/li>\n<li><u><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_280323&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python (16 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/u><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Data Science \u0438\u00a0Machine Learning<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-dlya-data-science#syllabus?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mat_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-i-machine-learning-dlya-data-science?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_matml_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438\u00a0Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dea_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Data Engineering<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning-i-deep-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mldl_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438\u00a0Deep Learning\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_ml_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Machine Learning<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_pws_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/frontend-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fr_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_webdev_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/ios-razrabotchik-s-nulya?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_ios_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/android-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_andr_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Java \u0438\u00a0C#<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/java-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_java_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer-testirovshik-po?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_qaja_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430\u00a0JAVA<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-sharp-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cdev_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/game-razrabotchik-na-unity-i-c-sharp?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_gamedev_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430\u00a0Unity<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041e\u0442\u00a0\u043e\u0441\u043d\u043e\u0432\u00a0\u2014 \u0432\u00a0\u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/algoritmy-i-struktury-dannyh?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_algo_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-plus-plus-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cplus_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_280323&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u00ab\u0411\u0435\u043b\u044b\u0439 \u0445\u0430\u043a\u0435\u0440\u00bb<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0410\u00a0\u0442\u0430\u043a\u0436\u0435<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/devops-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_devops_280323&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0DevOps<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_280323&amp;utm_term=cat\">\u0412\u0441\u0435 \u043a\u0443\u0440\u0441\u044b<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/725368\/\"> https:\/\/habr.com\/ru\/articles\/725368\/<\/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<p>\u0424\u0440\u0430\u043a\u0442\u0430\u043b\u044b \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0437\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0432\u043e\u043b \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0430\u0441\u0449\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0438. \u0422\u0435 \u0440\u0430\u0441\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0432\u0435\u0442\u0432\u0438 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0437\u043e\u0440\u044b. \u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\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-395845","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395845","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=395845"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395845\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}