{"id":271592,"date":"2016-01-04T21:04:02","date_gmt":"2016-01-04T18:04:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=271592"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=271592","title":{"rendered":"\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438 \u0413\u0430\u043b\u0430\u043a\u0443\u0431 \u043d\u0430 \u041f\u0438\u0442\u043e\u043d\u0435"},"content":{"rendered":"<p>       \u041d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0433\u043e\u0434 \u043a\u0443\u043f\u0438\u043b \u043f\u043b\u0435\u043c\u044f\u043d\u043d\u0438\u043a\u0443 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0443 \u0413\u0430\u043b\u0430\u043a\u0443\u0431. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043a\u0443\u0431 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 4\u04454\u04454. \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u0430\u043a \u0440\u0430\u0437, 4\u04454\u04454. \u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0434\u0430\u0440\u0438\u0442\u044c \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0443. \u041a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0418\u043d\u0442\u0443\u0438\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9bf\/74e\/247\/9bf74e2473ea4910a27c6586356c9709.JPG\"\/><\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0441\u043f\u0435\u0442\u044c \u0434\u043e \u043d\u043e\u0432\u043e\u0433\u043e\u0434\u043d\u0435\u0439 \u0440\u0435\u0447\u0438 \u041f\u0443\u0442\u0438\u043d\u0430. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u043b\u0430\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u0434 \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u043d\u0430 \u041c\u0430\u043a\u0431\u0443\u043a\u0435 \u043c\u043e\u0438\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043a\u0440\u0443\u0447\u0435, \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439. \u0415\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437\u0443\u0447\u0430\u044e\u0449\u0438\u043c \u041f\u0438\u0442\u043e\u043d.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 4\u04454\u04454.  <\/p>\n<pre><code class=\"python\">def zero_vector():     return [0] * 4   def zero_matrix():     return [zero_vector() for _ in xrange(4)]   def zero_tensor():     return [zero_matrix() for _ in xrange(4)] <\/code><\/pre>\n<p>  \u041a\u0443\u0431\u0438\u043a \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u043e\u0439 \u00abQ\u00bb, \u0443\u0433\u043e\u043b\u043e\u043a \u2014 \u0431\u0443\u043a\u0432\u043e\u0439 \u00abJ\u00bb, \u0437\u0430\u0433\u043e\u0433\u0443\u043b\u0438\u043d\u0430 \u2014 \u00abZ\u00bb.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1b9\/534\/add\/1b9534add3904536bf8dbc81625fa20e.JPG\"\/>  <\/p>\n<pre><code class=\"python\">def parse_tensor(data):     tensor = zero_tensor()     lines = data.splitlines()     for z in xrange(2):         for y in xrange(4):             line = lines[z * 5 + 1 + y]             for x in xrange(4):                 if line[x] == '*':                     tensor[z][y][x] = 1     return tensor       J = parse_tensor(&quot;&quot;&quot; ***. *... .... ....  ***. *... .... ....  &quot;&quot;&quot;)  Q = parse_tensor(&quot;&quot;&quot; **.. **.. .... ....  **.. **.. .... ....  &quot;&quot;&quot;)  Z = parse_tensor(&quot;&quot;&quot; *... *... .... ....  *... ***. .**. ....  &quot;&quot;&quot;)  &gt;&gt;&gt; J [[[1, 1, 1, 0], [1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],  [[1, 1, 1, 0], [1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],  [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],  [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]] <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0442\u0435\u043d\u0437\u043e\u0440\u044b (\u0430 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e), \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f show_tensor \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 parse_tensor:  <\/p>\n<pre><code class=\"python\">def show_tensor(tensor):     for y in xrange(4):         for z in xrange(4):             for x in xrange(4):                 value = tensor[z][y][x]                 print {                     1: '*',                     0: '.'                 }[value],             print ' ',         print   def show_tensors(tensors):     for tensor in tensors:         show_tensor(tensor)         print   &gt;&gt;&gt; show_tensors([J, Q, Z]) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * . .   * * . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * . . .   * . . .   . . . .   . . . .   * . . .   * * * .   . . . .   . . . .   . . . .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u044c\u043a\u0438. \u0412\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u0438 \u0425 \u0438 Y \u043d\u0430 90 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043e\u0441\u0435\u0439.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7f3\/a09\/a6b\/7f3a09a6ba9d463ba7dabc7140df1557.JPG\"\/>  <\/p>\n<pre><code class=\"python\">def rotate_by_x(tensor):     rotated = zero_tensor()     for z in xrange(4):         for y in xrange(4):             for x in xrange(4):                 rotated[z][y][x] = tensor[y][-z - 1][x]     return rotated       def rotate_by_y(tensor):     rotated = zero_tensor()     for z in xrange(4):         for y in xrange(4):             for x in xrange(4):                 rotated[z][y][x] = tensor[x][y][-z - 1]     return rotated <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e transform_tensor, \u043e\u043d\u0430 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435 \u0440\u0430\u0437:  <\/p>\n<pre><code class=\"python\">def transform_tensor(tensor, function):     transformed = zero_tensor()     for z in xrange(4):         for y in xrange(4):             for x in xrange(4):                 transformed[z][y][x] = function(tensor, x, y, z)     return transformed   def rotate_by_x(tensor):     return transform_tensor(tensor, lambda _, x, y, z: _[y][-z - 1][x])   def rotate_by_y(tensor):     return transform_tensor(tensor, lambda _, x, y, z: _[x][y][-z - 1]) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:  <\/p>\n<pre><code class=\"python\">def apply_transformation(tensor, transformation, times=1):     for _ in xrange(times):         tensor = transformation(tensor)     return tensor   def show_transformation(tensor, transformation):     show_tensors([         tensor,         transformation(tensor),         apply_transformation(tensor, transformation, times=2),         apply_transformation(tensor, transformation, times=3),         apply_transformation(tensor, transformation, times=4),     ])   &gt;&gt;&gt; show_transformation(J, rotate_by_x) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   * . . .   * * * .   . . . .   . . . .   * . . .   * * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   * * * .   * * * .    . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   * * * .   * . . .   . . . .   . . . .   * * * .   * . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .  &gt;&gt;&gt; show_transformation(J, rotate_by_y) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   * * . .   * * . .   * * . .   . . . .   . . . .   . . . .   * * . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   . * * *   . * * *   . . . .   . . . .   . . . *   . . . *   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . * *   . . * *   . . * *   . . . .   . . * *   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   <\/code><\/pre>\n<p>  \u0412\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u0438 Z \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043e\u0441\u0438 X \u0438 Y. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 rotate_by_y \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"python\">def rotate_by_y(tensor, direction=1):     if direction == 1:         function = lambda _, x, y, z: _[x][y][-z - 1]     else:         function = lambda _, x, y, z: _[-x - 1][y][z]     return transform_tensor(tensor, function)   def rotate_by_z(tensor):     return rotate_by_y(rotate_by_x(rotate_by_y(tensor, direction=-1))) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0d7\/bf9\/820\/0d7bf98206d84f118ec140a581a78335.JPG\"\/>  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; show_transformation(J, rotate_by_z) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . * *   . . * *   . . . .   . . . .   . . . *   . . . *   . . . .   . . . .   . . . *   . . . *   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . *   . . . *   . . . .   . . . .   . * * *   . * * *   . . . .   . . . .    . . . .   . . . .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . . <\/code><\/pre>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e, \u043a\u0440\u043e\u043c\u0435 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0441\u0434\u0432\u0438\u0433\u0438. \u0418\u043c\u0435\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e transform_tensor, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0434\u0432\u0438\u0433 \u0441 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<pre><code class=\"python\">def shift_by_x(tensor):     return transform_tensor(tensor, lambda _, x, y, z: _[z][y][(x + 1) % 4]) <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438:  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; show_transformation(J, shift_by_x) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * . *   * * . *   . . . .   . . . .   . . . *   . . . *   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * . * *   * . * *   . . . .   . . . .   . . * .   . . * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . * * *   . * * *   . . . .   . . . .   . * . .   . * . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   <\/code><\/pre>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c. \u0411\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0434\u0432\u0438\u0433, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043f\u0435\u0440\u0435\u043d\u043e\u0441. \u041d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u0442\u0443:  <\/p>\n<pre><code class=\"python\">def project_tensor(tensor, function):     projection = zero_matrix()     for i in xrange(4):         for j in xrange(4):             projection[i][j] = function(tensor, i, j)     return projection   def project_by_x(tensor):     return project_tensor(tensor, lambda _, z, y: tensor[z][y][0])   def project_by_y(tensor):     return project_tensor(tensor, lambda _, z, x: tensor[z][0][x])   def project_by_z(tensor):     return project_tensor(tensor, lambda _, y, x: tensor[0][y][x])   def is_empty_matrix(matrix):     for i in xrange(4):         for j in xrange(4):             if matrix[i][j]:                 return False     return True <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0432\u0438\u0433 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">def shift_by_x(tensor):     if is_empty_matrix(project_by_x(tensor)):         return transform_tensor(tensor, lambda _, x, y, z: _[z][y][(x + 1) % 4])     return tensor <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438 \u0434\u0435\u0442\u0430\u043b\u044c \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; show_transformation(J, shift_by_x) * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * * .   * * * .   . . . .   . . . .   * . . .   * . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . . <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438. \u041d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0434\u0432\u0438\u0433\u0438 \u0432 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. <a href=\"https:\/\/github.com\/alexanderkuk\/galacube\/blob\/master\/main.py#L123-L182\">\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/a> \u0435\u0441\u0442\u044c \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435. <\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u0438, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0443\u0433\u043b\u044b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0438 \u0432\u0441\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0434\u0432\u0438\u0433\u043e\u0432:  <\/p>\n<pre><code class=\"python\">def generate_permutations(tensor):     for x_rotations in xrange(4):         for y_rotations in xrange(4):             for z_rotations in xrange(4):                 for x_shifts in xrange(3):                     for x_direction in (-1, 1):                         for y_shifts in xrange(3):                             for y_direction in (-1, 1):                                 for z_shifts in xrange(3):                                     for z_direction in (-1, 1):                                         permutation = apply_transformation(tensor, rotate_by_x, times=x_rotations)                                         permutation = apply_transformation(permutation, rotate_by_y, times=y_rotations)                                         permutation = apply_transformation(permutation, rotate_by_z, times=z_rotations)                                         permutation = apply_transformation(permutation, shift_by_x, direction=x_direction, times=x_shifts)                                         permutation = apply_transformation(permutation, shift_by_y, direction=y_direction, times=y_shifts)                                         permutation = apply_transformation(permutation, shift_by_z, direction=z_direction, times=z_shifts)                                         yield permutation <\/code><\/pre>\n<p>  \u041c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0443\u0431\u0438\u043a \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u044d\u0442\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442:  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; Qs = list(generate_permutations(Q)) &gt;&gt;&gt; show_tensors(sample(Qs, 10)) * * . .   * * . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    * * . .   * * . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0432\u0438\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u0443 \u0447\u0438\u0441\u043b\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 4\u04454\u04454 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e 64-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430:  <\/p>\n<pre><code class=\"python\">def hash_tensor(tensor):     hash = 0     index = 0     for z in xrange(4):         for y in xrange(4):             for x in xrange(4):                 index += 1                 hash += tensor[z][y][x] * 2 ** index     return hash <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<pre><code class=\"python\">def unique_tensors(tensors):     hashes = set()     for tensor in tensors:         hash = hash_tensor(tensor)         if hash not in hashes:             yield tensor         hashes.add(hash)   Zs = list(unique_tensors(generate_permutations(Z))) Js = list(unique_tensors(generate_permutations(J))) Qs = list(unique_tensors(generate_permutations(Q)))   &gt;&gt;&gt; show_tensors(sample(Qs, 10)) . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .   * * . .   * * . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . * * .   . * * .    . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .    . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . . . .   . . . .   . . * *   . . * *   . . . .   . . . .   . . * *   . . * *   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .    . * * .   . * * .   . . . .   . . . .   . * * .   . * * .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . .   . . . . <\/code><\/pre>\n<p>  \u0417\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0443\u0431\u0438\u043a \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; len(Zs), len(Js), len(Qs) (288, 432, 27) <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0433 \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">def solve(Zs, Js, Qs):     for Z1 in Zs:         for Z2 in Zs:             for Z3 in Zs:                 for J1 in Js:                     for J2 in Js:                         for J3 in Js:                             for Q1 in Qs:                                 for Q2 in Qs:                                     if not tensors_intersect(Z1, Z2, Z3, J1, J2, J3, Q1, Q2):                                         yield Z1, Z2, Z3, J1, J2, J3, Q1, Q2 <\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u0443\u043f\u043e, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c 288<sup>3<\/sup>432<sup>3<\/sup>27<sup>2<\/sup> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0412\u044b\u0445\u043e\u0434 \u0435\u0441\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c, \u043d\u0443\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u043e\u0439. \u0412 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432 \u043b\u043e\u0431 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 Z1 \u0438 Z2 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 6 \u043f\u043e\u0434\u0446\u0438\u043a\u043b\u043e\u0432 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">def solve_(path, done, hashes, todo):     for hash in hashes:         if not tensors_intersect(done, hash):             if todo:                 for solution in solve_(path + [hash], union_hashes(done, hash), todo[0], todo[1:]):                     yield solution             else:                 yield path + [hash]   def solve(Zs, Js, Qs):     done = zero_tensor()     todo = [Z_hashes] * 3 + [J_hashes] * 3 + [Q_hashes] * 2     for solution in solve_([], done, todo[0], todo[1:]):         yield solution <\/code><\/pre>\n<p>  \u041d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441. \u0424\u0443\u043d\u043a\u0446\u0438\u044f tensors_intersect \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">def tensors_intersect(a, b):     for z in xrange(4):         for y in xrange(4):             for x in xrange(4): \t        if a[z][y][x] and b[z][y][x]: \t\t    return True     return False <\/code><\/pre>\n<p>  \u041e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u043b\u0433\u043e. \u0412\u044b\u0445\u043e\u0434 \u043e\u043f\u044f\u0442\u044c \u0435\u0441\u0442\u044c. \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0435\u043d\u0437\u043e\u0440\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0447\u0438\u0441\u043b\u043e, \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0430\u0447\u043d\u043e. \u0415\u0441\u043b\u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">def tensor_hashes_intersect(a, b):     return a & b <\/code><\/pre>\n<p>  \u041f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f:  <\/p>\n<pre><code class=\"python\">def union_tensor_hashes(a, b):     return a | b   def unhash_tensor(hash):     tensor = zero_tensor()     index = 0     for z in xrange(4):         for y in xrange(4):             for x in xrange(4):                 index += 1                 if hash & 2 ** index:                     tensor[z][y][x] = 1     return tensor   def solve_(path, done, hashes, todo):     for hash in hashes:         if not tensor_hashes_intersect(done, hash):             if todo:                 for solution in solve_(path + [hash], union_tensor_hashes(done, hash), todo[0], todo[1:]):                     yield solution             else:                 yield path + [hash]   def solve(Zs, Js, Qs):     Z_hashes = [hash_tensor(_) for _ in Zs]     J_hashes = [hash_tensor(_) for _ in Js]     Q_hashes = [hash_tensor(_) for _ in Qs]     done = hash_tensor(zero_tensor())     todo = [Z_hashes] * 3 + [J_hashes] * 3 + [Q_hashes] * 2     for solution in solve_([], done, todo[0], todo[1:]):         yield [unhash_tensor(_) for _ in solution] <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\">solutions = list(solve(Zs, Js, Qs)) <\/code><\/pre>\n<p>  \u0416\u0434\u0451\u043c \u0448\u0435\u0441\u0442\u044c \u0447\u0430\u0441\u043e\u0432 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 576 \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0445\u0441\u044f. \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 8 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; show_tensors(unique_tensors(solution_tensor(_) for _ in solutions)) # # # *   # * * *   * * . .   * * . .   # # # *   # * * *   # * . .   # * . .   . . # #   . . * *   # * * *   # * * *   . . # #   . . # #   # # # #   # # * *    . . # #   . . # #   # # # *   # # # *   . . # #   . . * *   # * * *   # * * *   # # # #   # * * *   # * . .   * * . .   # # * *   # * * *   # * . .   * * . .    # # . .   # # . .   # # # #   * * # #   # # . .   * * . .   * * * #   * * * #   * # # #   * * * #   . . * #   . . * #   * # # #   * * * #   . . * *   . . * *    * * # #   * * * #   . . * #   . . * *   # # # #   * * * #   . . * #   . . * *   # # . .   * * . .   * * * #   * * * #   # # . .   # # . .   * # # #   * # # #    * * . .   # * . .   # * * *   # # * *   * * . .   # * . .   # * * *   # # # #   # * * *   # * * *   . . * *   . . # #   # # # *   # # # *   . . # #   . . # #    # # * *   # # # #   . . # #   . . # #   # * * *   # * * *   . . * *   . . # #   # * . .   # * . .   # * * *   # # # *   * * . .   * * . .   # * * *   # # # *    * # # #   * # # #   # # . .   # # . .   * * * #   * * * #   * * . .   # # . .   . . * *   . . * #   * * * #   # # # #   . . * *   . . * #   * * * #   * * # #    . . * *   . . * *   * * * #   * # # #   . . * #   . . * #   * * * #   * # # #   * * * #   * * * #   * * . .   # # . .   * * # #   # # # #   # # . .   # # . .   <\/code><\/pre>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u0413\u0430\u043b\u0430\u043a\u0443\u0431\u0430 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/274527\/\"> http:\/\/habrahabr.ru\/post\/274527\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0433\u043e\u0434 \u043a\u0443\u043f\u0438\u043b \u043f\u043b\u0435\u043c\u044f\u043d\u043d\u0438\u043a\u0443 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0443 \u0413\u0430\u043b\u0430\u043a\u0443\u0431. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043a\u0443\u0431 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 4\u04454\u04454. \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u0430\u043a \u0440\u0430\u0437, 4\u04454\u04454. \u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0434\u0430\u0440\u0438\u0442\u044c \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0443. \u041a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0418\u043d\u0442\u0443\u0438\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9bf\/74e\/247\/9bf74e2473ea4910a27c6586356c9709.JPG\"\/><\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0441\u043f\u0435\u0442\u044c \u0434\u043e \u043d\u043e\u0432\u043e\u0433\u043e\u0434\u043d\u0435\u0439 \u0440\u0435\u0447\u0438 \u041f\u0443\u0442\u0438\u043d\u0430. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u043b\u0430\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u0434 \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u043d\u0430 \u041c\u0430\u043a\u0431\u0443\u043a\u0435 \u043c\u043e\u0438\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043a\u0440\u0443\u0447\u0435, \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439. \u0415\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437\u0443\u0447\u0430\u044e\u0449\u0438\u043c \u041f\u0438\u0442\u043e\u043d.  <\/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-271592","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271592","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=271592"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271592\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=271592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=271592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}