{"id":377037,"date":"2024-05-25T15:00:41","date_gmt":"2024-05-25T15:00:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=377037"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=377037","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C# \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 Python \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C# \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 C#. \u042d\u0442\u043e\u0442 \u0433\u0430\u0439\u0434 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C#, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 Python \u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<h4>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d .NET SDK<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 C# \u0438 Python<\/p>\n<\/li>\n<\/ul>\n<h4>\u0428\u0430\u0433 1: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Python<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong> \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<pre><code class=\"bash\">python -m venv myenv<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0430 Windows:<\/p>\n<pre><code class=\"bash\">myenv\\Scripts\\activate<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430 Unix \u0438\u043b\u0438 MacOS:<\/p>\n<pre><code class=\"bash\">source myenv\/bin\/activate<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b Python:<\/strong><\/p>\n<pre><code class=\"bash\">pip install pandas<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0428\u0430\u0433 2: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>pandas<\/code>. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u0430\u043a <code>main.py<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>PythonApplication<\/code>.<\/p>\n<pre><code class=\"python\">import sys import pandas as pd  def add(a, b):     return a + b  if __name__ == \"__main__\":     if len(sys.argv) != 3:         print(\"Usage: python main.py &lt;num1> &lt;num2>\")         sys.exit(1)      # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 DataFrame \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438     data = {'num1': [sys.argv[1]], 'num2': [sys.argv[2]]}     df = pd.DataFrame(data)      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 \u0442\u0438\u043f float     df = df.astype(float)      # \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f     result = add(df['num1'].iloc[0], df['num2'].iloc[0])          print(result) <\/code><\/pre>\n<h4>\u0428\u0430\u0433 3: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C#<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 .NET:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet new console -n CSharpPython cd CSharpPython<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <\/strong><code>Program.cs<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python:<br \/> \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>Program.cs<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"cs\">using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Globalization;  class Program {     static void Main(string[] args)     {         try         {             \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 Python             string pythonScriptPath = FindPythonScript(\"PythonApplication\", \"main.py\");              \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python             if (string.IsNullOrEmpty(pythonScriptPath) || !File.Exists(pythonScriptPath))             {                 Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: \u0441\u043a\u0440\u0438\u043f\u0442 Python \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438: {pythonScriptPath}\");                 return;             }              \/\/ \u041f\u0443\u0442\u044c \u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 Python \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438             string pythonInterpreterPath = FindPythonInterpreter(\"PythonApplication\", \"myenv\", \"Scripts\", \"python.exe\");              \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 Python             if (string.IsNullOrEmpty(pythonInterpreterPath) || !File.Exists(pythonInterpreterPath))             {                 Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438: {pythonInterpreterPath}\");                 return;             }              \/\/ \u0427\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f             double num1 = 5.5;             double num2 = 4.5;              \/\/ \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0447\u0438\u0441\u0435\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c invariant culture (\u0442\u043e\u0447\u043a\u0430 \u043a\u0430\u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c)             string num1Str = num1.ToString(CultureInfo.InvariantCulture);             string num2Str = num2.ToString(CultureInfo.InvariantCulture);              \/\/ \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f             Stopwatch stopwatch = new Stopwatch();             stopwatch.Start();              \/\/ \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python             ProcessStartInfo start = new ProcessStartInfo();             start.FileName = pythonInterpreterPath;             start.Arguments = $\"{pythonScriptPath} {num1Str} {num2Str}\";             start.WorkingDirectory = Path.GetDirectoryName(pythonScriptPath);             start.UseShellExecute = false;             start.RedirectStandardOutput = true;             start.RedirectStandardError = true; \/\/ \u0417\u0430\u0445\u0432\u0430\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a             start.CreateNoWindow = true;              using (Process process = Process.Start(start))             {                 using (StreamReader reader = process.StandardOutput)                 {                     string result = reader.ReadToEnd();                     Console.WriteLine($\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: {result}\");                 }                  using (StreamReader errorReader = process.StandardError)                 {                     string error = errorReader.ReadToEnd();                     if (!string.IsNullOrEmpty(error))                     {                         Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: {error}\");                     }                 }                  process.WaitForExit();                 int exitCode = process.ExitCode;                 Console.WriteLine($\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c: {exitCode}\");             }              \/\/ \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f             stopwatch.Stop();             TimeSpan ts = stopwatch.Elapsed;             Console.WriteLine($\"\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f: {ts.TotalMilliseconds} \u043c\u0441\");         }         catch (Exception ex)         {             Console.WriteLine($\"\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: {ex.Message}\");             Console.WriteLine($\"\u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432: {ex.StackTrace}\");         }     }      static string FindPythonScript(string directory, string scriptName)     {         return FindFile(directory, scriptName);     }      static string FindPythonInterpreter(string directory, string venvDirectory, string scriptsDirectory, string pythonExe)     {         return FindFile(directory, Path.Combine(venvDirectory, scriptsDirectory, pythonExe));     }      static string FindFile(string directory, string fileName)     {         \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u0431\u043e\u0440\u043a\u0438         string currentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);          while (currentDirectory != null)         {             string foundPath = SearchDirectory(currentDirectory, directory, fileName);             if (foundPath != null)             {                 return foundPath;             }              \/\/ \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433             currentDirectory = Directory.GetParent(currentDirectory)?.FullName;         }          \/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0432\u0435\u0440\u043d\u0443\u0442\u044c null         return null;     }      static string SearchDirectory(string baseDirectory, string targetDirectory, string fileName)     {         \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438         string targetPath = Path.Combine(baseDirectory, targetDirectory);          if (Directory.Exists(targetPath))         {             string filePath = Path.Combine(targetPath, fileName);             if (File.Exists(filePath))             {                 return filePath;             }              \/\/ \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445             foreach (string subDirectory in Directory.GetDirectories(targetPath))             {                 string foundPath = SearchDirectory(subDirectory, string.Empty, fileName);                 if (foundPath != null)                 {                     return foundPath;                 }             }         }          return null;     } } <\/code><\/pre>\n<h4>\u0428\u0430\u0433 4: \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C#:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet build<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet run<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u0438\u043c \u0448\u0430\u0433\u0430\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C#, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 Python. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 Python. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/817041\/\"> https:\/\/habr.com\/ru\/articles\/817041\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 Python \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C# \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 C#. \u042d\u0442\u043e\u0442 \u0433\u0430\u0439\u0434 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C#, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 Python \u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<h4>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d .NET SDK<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 C# \u0438 Python<\/p>\n<\/li>\n<\/ul>\n<h4>\u0428\u0430\u0433 1: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Python<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong> \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<pre><code class=\"bash\">python -m venv myenv<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0430 Windows:<\/p>\n<pre><code class=\"bash\">myenv\\Scripts\\activate<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430 Unix \u0438\u043b\u0438 MacOS:<\/p>\n<pre><code class=\"bash\">source myenv\/bin\/activate<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b Python:<\/strong><\/p>\n<pre><code class=\"bash\">pip install pandas<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0428\u0430\u0433 2: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>pandas<\/code>. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u0430\u043a <code>main.py<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>PythonApplication<\/code>.<\/p>\n<pre><code class=\"python\">import sys import pandas as pd  def add(a, b):     return a + b  if __name__ == \"__main__\":     if len(sys.argv) != 3:         print(\"Usage: python main.py &lt;num1> &lt;num2>\")         sys.exit(1)      # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 DataFrame \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438     data = {'num1': [sys.argv[1]], 'num2': [sys.argv[2]]}     df = pd.DataFrame(data)      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 \u0442\u0438\u043f float     df = df.astype(float)      # \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f     result = add(df['num1'].iloc[0], df['num2'].iloc[0])          print(result) <\/code><\/pre>\n<h4>\u0428\u0430\u0433 3: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C#<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 .NET:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet new console -n CSharpPython cd CSharpPython<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <\/strong><code>Program.cs<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python:<br \/> \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>Program.cs<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"cs\">using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Globalization;  class Program {     static void Main(string[] args)     {         try         {             \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 Python             string pythonScriptPath = FindPythonScript(\"PythonApplication\", \"main.py\");              \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python             if (string.IsNullOrEmpty(pythonScriptPath) || !File.Exists(pythonScriptPath))             {                 Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: \u0441\u043a\u0440\u0438\u043f\u0442 Python \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438: {pythonScriptPath}\");                 return;             }              \/\/ \u041f\u0443\u0442\u044c \u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 Python \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438             string pythonInterpreterPath = FindPythonInterpreter(\"PythonApplication\", \"myenv\", \"Scripts\", \"python.exe\");              \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 Python             if (string.IsNullOrEmpty(pythonInterpreterPath) || !File.Exists(pythonInterpreterPath))             {                 Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438: {pythonInterpreterPath}\");                 return;             }              \/\/ \u0427\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f             double num1 = 5.5;             double num2 = 4.5;              \/\/ \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0447\u0438\u0441\u0435\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c invariant culture (\u0442\u043e\u0447\u043a\u0430 \u043a\u0430\u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c)             string num1Str = num1.ToString(CultureInfo.InvariantCulture);             string num2Str = num2.ToString(CultureInfo.InvariantCulture);              \/\/ \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f             Stopwatch stopwatch = new Stopwatch();             stopwatch.Start();              \/\/ \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python             ProcessStartInfo start = new ProcessStartInfo();             start.FileName = pythonInterpreterPath;             start.Arguments = $\"{pythonScriptPath} {num1Str} {num2Str}\";             start.WorkingDirectory = Path.GetDirectoryName(pythonScriptPath);             start.UseShellExecute = false;             start.RedirectStandardOutput = true;             start.RedirectStandardError = true; \/\/ \u0417\u0430\u0445\u0432\u0430\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a             start.CreateNoWindow = true;              using (Process process = Process.Start(start))             {                 using (StreamReader reader = process.StandardOutput)                 {                     string result = reader.ReadToEnd();                     Console.WriteLine($\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: {result}\");                 }                  using (StreamReader errorReader = process.StandardError)                 {                     string error = errorReader.ReadToEnd();                     if (!string.IsNullOrEmpty(error))                     {                         Console.WriteLine($\"\u041e\u0448\u0438\u0431\u043a\u0430: {error}\");                     }                 }                  process.WaitForExit();                 int exitCode = process.ExitCode;                 Console.WriteLine($\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c: {exitCode}\");             }              \/\/ \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f             stopwatch.Stop();             TimeSpan ts = stopwatch.Elapsed;             Console.WriteLine($\"\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f: {ts.TotalMilliseconds} \u043c\u0441\");         }         catch (Exception ex)         {             Console.WriteLine($\"\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: {ex.Message}\");             Console.WriteLine($\"\u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432: {ex.StackTrace}\");         }     }      static string FindPythonScript(string directory, string scriptName)     {         return FindFile(directory, scriptName);     }      static string FindPythonInterpreter(string directory, string venvDirectory, string scriptsDirectory, string pythonExe)     {         return FindFile(directory, Path.Combine(venvDirectory, scriptsDirectory, pythonExe));     }      static string FindFile(string directory, string fileName)     {         \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u0431\u043e\u0440\u043a\u0438         string currentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);          while (currentDirectory != null)         {             string foundPath = SearchDirectory(currentDirectory, directory, fileName);             if (foundPath != null)             {                 return foundPath;             }              \/\/ \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433             currentDirectory = Directory.GetParent(currentDirectory)?.FullName;         }          \/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0432\u0435\u0440\u043d\u0443\u0442\u044c null         return null;     }      static string SearchDirectory(string baseDirectory, string targetDirectory, string fileName)     {         \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438         string targetPath = Path.Combine(baseDirectory, targetDirectory);          if (Directory.Exists(targetPath))         {             string filePath = Path.Combine(targetPath, fileName);             if (File.Exists(filePath))             {                 return filePath;             }              \/\/ \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445             foreach (string subDirectory in Directory.GetDirectories(targetPath))             {                 string foundPath = SearchDirectory(subDirectory, string.Empty, fileName);                 if (foundPath != null)                 {                     return foundPath;                 }             }         }          return null;     } } <\/code><\/pre>\n<h4>\u0428\u0430\u0433 4: \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C#:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet build<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<pre><code class=\"bash\">dotnet run<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u0438\u043c \u0448\u0430\u0433\u0430\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C#, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 Python. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 Python. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Python.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/817041\/\"> https:\/\/habr.com\/ru\/articles\/817041\/<\/a><br \/><\/br><\/br><\/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-377037","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377037","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=377037"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377037\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}