{"id":963,"date":"2020-05-21T12:00:33","date_gmt":"2020-05-21T03:00:33","guid":{"rendered":"http:\/\/hirlab.net\/nblog\/?p=963"},"modified":"2020-05-21T10:27:24","modified_gmt":"2020-05-21T01:27:24","slug":"python%e3%82%92%e3%82%b7%e3%82%a7%e3%83%ab%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%81%bf%e3%81%9f%e3%81%8f%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/","title":{"rendered":"Python\u3092\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u307f\u305f\u304f\u4f7f\u3046"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-light-blue\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\" title=\"\u306f\u3058\u3081\u306b\">\u306f\u3058\u3081\u306b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E3%81%A9%E3%82%93%E3%81%AA%E3%81%A8%E3%81%8D%E3%81%AB\/%E3%81%A9%E3%82%93%E3%81%AA%E4%BA%BA%E3%81%8C%E4%BD%BF%E3%81%86%E3%81%AE%E3%81%95\" title=\"\u3069\u3093\u306a\u3068\u304d\u306b\/\u3069\u3093\u306a\u4eba\u304c\u4f7f\u3046\u306e\u3055\">\u3069\u3093\u306a\u3068\u304d\u306b\/\u3069\u3093\u306a\u4eba\u304c\u4f7f\u3046\u306e\u3055<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#_subprocess\" title=\"\u00a0subprocess\">\u00a0subprocess<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E5%8D%98%E7%B4%94%E3%81%AA%E4%BE%8B\" title=\"\u5358\u7d14\u306a\u4f8b\">\u5358\u7d14\u306a\u4f8b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E6%8C%87%E5%AE%9A\" title=\"\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\">\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E5%AE%9F%E8%A1%8C%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%82%92%E6%8C%87%E5%AE%9A\" title=\"\u5b9f\u884c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\">\u5b9f\u884c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E5%AE%9F%E9%A8%93%E7%94%A8%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E4%BE%8B\" title=\"\u5b9f\u9a13\u7528\u30d5\u30a1\u30a4\u30eb\u4f8b\">\u5b9f\u9a13\u7528\u30d5\u30a1\u30a4\u30eb\u4f8b<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_963\/#%E3%81%82%E3%81%A8%E3%81%8C%E3%81%8D\" title=\"\u3042\u3068\u304c\u304d\">\u3042\u3068\u304c\u304d<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\"><\/span>\u306f\u3058\u3081\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Python\u3063\u3066\u4fbf\u5229\u3067\u3059\uff0e<\/p>\n<p>\u3063\u3066\u3044\u3046\u6587\u8a00\u3092\u3044\u308d\u3093\u306a\u3068\u3053\u308d\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\uff0c<strong>Python\u306e\u826f\u3044\u3068\u3053\u308d\u306f\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u3067\u8272\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u3061\u3083\u3046<\/strong>\u3068\u3053\u308d\u3067\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306f\u305d\u306e\u4e00\u3064\u3068\u3057\u3066\uff0c\u300cPython\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3084\u308d\u3046\u300d\u3067\u3059\uff0e<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%A9%E3%82%93%E3%81%AA%E3%81%A8%E3%81%8D%E3%81%AB\/%E3%81%A9%E3%82%93%E3%81%AA%E4%BA%BA%E3%81%8C%E4%BD%BF%E3%81%86%E3%81%AE%E3%81%95\"><\/span>\u3069\u3093\u306a\u3068\u304d\u306b\/\u3069\u3093\u306a\u4eba\u304c\u4f7f\u3046\u306e\u3055<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4f8b\u3048\u3070\uff0c<\/p>\n<ol>\n<li>C\/C++\u3084Java\u306a\u3069\u3067\u66f8\u3044\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u901f\u5ea6\u3092\u8a08\u6e2c\u3057\u3066\u3059\u3050\u306bmatplotlib\u3067\u56f3\u8868\u3092\u63cf\u753b\u3057\u305f\u3044\u3068\u304d<\/li>\n<li>\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u63cf\u3044\u305f\u3053\u3068\u306a\u3044\u3051\u3069Python\u306a\u3089\u3059\u3050\u306b\u66f8\u3051\u308b\u4eba<\/li>\n<li>Python\u304c\u5927\u597d\u304d\u3059\u304e\u308b\u4eba<\/li>\n<\/ol>\n<p>\u3067\u3059\uff0e<\/p>\n<p>\u3044\u3084\uff0c\u591a\u5206\u307b\u304b\u306b\u3082\u6b63\u3057\u3044\u4f7f\u3044\u65b9\u306f\u3042\u308b\u3068\u306f\u601d\u3044\u307e\u3059\u304c...<\/p>\n<h2><span class=\"ez-toc-section\" id=\"_subprocess\"><\/span>\u00a0subprocess<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Python\u306esubprocess\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\uff0c\u5b9f\u969b\u306b\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u6253\u9375\u3057\u3066\u7d50\u679c\u3092\u5f97\u308b\u3088\u3046\u306b\uff0c\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u305d\u306e\u51fa\u529b\u3084\u30a8\u30e9\u30fc\u306a\u3069\u3092\u53d6\u5f97\u3067\u304d\u305f\u308a\u3059\u308b\uff0e<\/p>\n<p>\u4eca\u56de\u7d39\u4ecb\u3059\u308b\u30b3\u30fc\u30c9\u306f<strong>Python3.5\u4ee5\u964d\u3067\u52d5\u4f5c<\/strong>\u3059\u308b\u306e\u3067\u3054\u4e86\u627f\u3044\u305f\u3060\u304d\u305f\u3044\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%8D%98%E7%B4%94%E3%81%AA%E4%BE%8B\"><\/span>\u5358\u7d14\u306a\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u307e\u305a\u306f\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u304b\u3089\uff0e<\/p>\n<p>\u57fa\u672c\u306f\u4ee5\u4e0b\u306e\u8a18\u6cd5\u3067\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u53ef\u80fd\u3067\u3042\u308b\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">import subprocess\r\n\r\nif __name__ == '__main__':\r\n    \r\n    # \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\uff0c\u305d\u306e\u7d50\u679c\u3092\u4fdd\u6301\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u53d6\u5f97\r\n    res = subprocess.run('ls', stdout=subprocess.PIPE)\r\n    \r\n    # \u305d\u306e\u3046\u3061\u51fa\u529b\u60c5\u5831\u3092UTF-8\u306b\u30c7\u30b3\u30fc\u30c9\u3057\u3066\u51fa\u529b\r\n    print(res.stdout.decode('utf8'))\r\n<\/pre>\n<p><span class=\"lang:python decode:true crayon-inline \">subprocess.run<\/span>\u00a0\u3067\u8fd4\u3063\u3066\u304f\u308b\u3082\u306e\u306f\uff0c\u51fa\u529b\u7d50\u679c\u305d\u306e\u3082\u306e\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u304f\uff0c<span class=\"lang:python decode:true crayon-inline \">CompletedProcess<\/span>\u00a0\u30af\u30e9\u30b9\u3068\u3044\u3046\u51fa\u529b\u60c5\u5831\u3084\u30a8\u30e9\u30fc\u60c5\u5831\uff0c\u6295\u3052\u305f\u30b3\u30de\u30f3\u30c9\u306e\u60c5\u5831\u3092\u6301\u3063\u305f\u30af\u30e9\u30b9\u304c\u8fd4\u308b\uff0e<\/p>\n<p>\u305d\u306e\u969b\uff0c\u6b32\u3057\u3044\u3082\u306e\u306f\u5f15\u6570\u3067<span class=\"lang:python decode:true crayon-inline \">subprocess.PIPE<\/span>\u00a0\u3092\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308b\uff0e<\/p>\n<p>\u3061\u306a\u307f\u306b\uff0c<span class=\"lang:c++ decode:true crayon-inline\">res.args<\/span>\u00a0\u3067\u6295\u3052\u305f\u30b3\u30de\u30f3\u30c9\u3092\u53c2\u7167\u53ef\u80fd\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E6%8C%87%E5%AE%9A\"><\/span>\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u4f8b\u3048\u3070\uff0c<span class=\"lang:sh decode:true crayon-inline \">ls -a<\/span>\u00a0\u3092\u5b9f\u884c\u3057\u305f\u3044\u6642\u306b\u306f\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30ea\u30b9\u30c8\u3067\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308b\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">res = subprocess.run(['ls', '-a'], stdout=subprocess.PIPE)<\/pre>\n<p><span class=\"lang:sh decode:true crayon-inline\">'ls -a'<\/span>\u00a0\u306f\u30c0\u30e1\uff0e<\/p>\n<p>\u306a\u304a\uff0c\u4ee5\u4e0b\u306e\u69d8\u306b\u8907\u6570\u30b3\u30de\u30f3\u30c9\u3092\u540c\u6642\u306b\u5b9f\u884c\u306a\u3069\u306f\u3067\u304d\u306a\u3044\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">res = subprocess.run(['ls', 'pwd'], stdout=subprocess.PIPE)  # \u3053\u308c\u306f\u30c0\u30e1<\/pre>\n<p>\u3082\u3057\uff0c\u8907\u6570\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3051\u308c\u3070\uff0c\u305d\u306e\u90fd\u5ea6<span class=\"lang:python decode:true crayon-inline \">run()<\/span>\u00a0\u3092\u547c\u3076\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%AE%9F%E8%A1%8C%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%82%92%E6%8C%87%E5%AE%9A\"><\/span>\u5b9f\u884c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3069\u3053\u3067\u547c\u3073\u51fa\u3057\u3066\u3082\uff0c\u6240\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u305d\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3044\u3068\u304d\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">res = subprocess.run(['ls', '-l'], stdout=subprocess.PIPE, cwd='\/Users\/araki')<\/pre>\n<p>\u3061\u306a\u307f\u306b\uff0c\u50d5\u306e\u74b0\u5883\u3067\u306f<span class=\"lang:python decode:true crayon-inline \">~<\/span>\u00a0\u306f\u4f7f\u3048\u306a\u304b\u3063\u305f\uff0e<\/p>\n<p>\u3082\u3057\uff0c\u3069\u3046\u3057\u3066\u3082<strong>\u52d5\u7684\u306a\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u30d1\u30b9\u3092\u5b9f\u884c\u3057\u305f\u3044\u306e\u306a\u3089<\/strong>\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u304c\u3042\u308b\u3088\u3046\u3060\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">import os\r\nres = subprocess.run(['ls', '-l'], stdout=subprocess.PIPE, cwd=os.path.expanduser('~'))<\/pre>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">import pathlib\r\nres = subprocess.run(['ls', '-l'], stdout=subprocess.PIPE, cwd=pathlib.Path.home())<\/pre>\n<p>\u3061\u306a\u307f\u306b\uff0c<span class=\"lang:python decode:true crayon-inline \">str(pathlib.Path.home())<\/span>\u00a0\u306e\u307b\u3046\u304c\u6b63\u3057\u3044\uff0e<\/p>\n<p><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-7123758399787647\"\n     data-ad-slot=\"1665651601\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%AE%9F%E9%A8%93%E7%94%A8%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E4%BE%8B\"><\/span>\u5b9f\u9a13\u7528\u30d5\u30a1\u30a4\u30eb\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3053\u3053\u304b\u3089\u306f\u5b9f\u7528\u4f8b\uff0e<\/p>\n<p>\u60f3\u5b9a\u3068\u3057\u3066\u306f\uff0c\u3068\u3042\u308b\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u5b9f\u884c\u6642\u9593\u3092\u8abf\u67fb\u3057\u305f\u3044\u6642\u306b\u66f8\u304f\u30b3\u30fc\u30c9\uff0e<\/p>\n<p>\u5b9f\u9a13\u80cc\u666f\u306e\u8a73\u7d30\u306f\u4ee5\u4e0b\uff0e<\/p>\n<ol>\n<li>\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306f\u300cexample\u300d<\/li>\n<li>\u5f15\u6570\u3092\u4e00\u3064\u53d6\u308a\uff0c\u305d\u306e\u5f15\u6570\u306b\u3088\u3063\u3066\u5b9f\u884c\u6642\u9593\u306b\u5909\u5316\u304c\u3042\u308b<\/li>\n<li>\u5b9f\u884c\u7d50\u679c\u306f\u7279\u306b\u5fc5\u8981\u306a\u3044<\/li>\n<li>10\u8a66\u884c\u5206\u3068\u308a\uff0c\u5e73\u5747\u304a\u3088\u3073\u8aa4\u5dee\u3092\u8abf\u67fb\u3057\u305f\u3044<\/li>\n<\/ol>\n<p>\u305d\u3046\u3059\u308b\u3068\uff0c\u3053\u3093\u306a\u30b3\u30fc\u30c9\u3067\u3057\u3087\u3046\u304b\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\">import numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom time import time\r\nimport subprocess\r\n\r\nif __name__ == '__main__':\r\n\r\n    trial = 10    # \u8a66\u884c\u56de\u6570\r\n    results = []  # \u7d50\u679c\u3092\u683c\u7d0d\u3059\u308b\u30ea\u30b9\u30c8\r\n    \r\n    expt_range = np.arange(10, 100, 10)  # \u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u5f15\u6570\r\n\r\n    for _ in range(10):\r\n        result = []\r\n        \r\n        for i in expt_range:\r\n            args = ['.\/example', f'{i}']  # \u5b9f\u884c\u30b3\u30de\u30f3\u30c9\r\n            \r\n            start = time()  # \u8a08\u6e2c\u30b9\u30bf\u30fc\u30c8\r\n            \r\n            subprocess.run(args)  # \u5b9f\u884c\uff01\r\n            \r\n            result.append(time() - start)  # \u8a08\u6e2c\u6642\u9593\u3092\u683c\u7d0d\r\n            \r\n        results.append(result)\r\n\r\n    results = np.array(results)\r\n\r\n    # \u7d50\u679c\u3092\u30d7\u30ed\u30c3\u30c8\r\n    _mean = np.mean(results, 0)  # \u5168\u8a66\u884c\u5206\u306e\u5e73\u5747\u5024\r\n    _std = np.std(results, 0)    # \u5168\u8a66\u884c\u5206\u306e\u6a19\u6e96\u504f\u5dee\r\n\r\n    plt.plot(expt_range, _mean, c='tab:blue', marker='.')\r\n    plt.errorbar(expt_range, _mean, _std, c='tab:blue')\r\n    plt.show()\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\uff0c\u5b9f\u884c\u304b\u3089\u30b0\u30e9\u30d5\u63cf\u753b\u307e\u3067Python\u30d5\u30a1\u30a4\u30eb\u4e00\u3064\u3067\u6e08\u3080\u306e\u306f\u826f\u3044\u3068\u3053\u308d\u3067\u3059\uff0e<\/p>\n<p>\u305f\u3060\u3057\uff0c\u304b\u306a\u308a\u7cbe\u5bc6\u306b\u5b9f\u884c\u6642\u9593\u3092\u8a08\u6e2c\u3059\u308b\u306e\u3067\u3042\u308c\u3070\uff0c<span class=\"lang:python decode:true crayon-inline \">run()<\/span>\u00a0\u5185\u3067\u306e<strong>\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059<\/strong>\u306e\u3067\uff0c\u66f8\u3044\u3068\u3044\u3066\u8a00\u3046\u306e\u3082\u3042\u308c\u3067\u3059\u304c\u304a\u52e7\u3081\u3067\u304d\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3082\u3057\uff0c\u3088\u308a\u6b63\u78ba\u306a\u5b9f\u884c\u6642\u9593\u304c\u6b32\u3057\u3051\u308c\u3070\uff0c\u666e\u901a\u306b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u66f8\u304f\u304b\uff0cC++\u306echrono\u3092\u4f7f\u3063\u305f\u65b9\u304c\u826f\u3044\u3060\u308d\u3046\uff0e<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%82%E3%81%A8%E3%81%8C%E3%81%8D\"><\/span>\u3042\u3068\u304c\u304d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4eca\u56de\u306f\uff0cPython\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u307f\u308b\uff0c\u3068\u3044\u3046\u8a18\u4e8b\u3067\u3057\u305f\uff0e<\/p>\n<p>\u5b9f\u969b\uff0c\u4f7f\u3046\u6a5f\u4f1a\u306f\u3042\u307e\u308a\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\uff0cCPU\u6e29\u5ea6\u3084GPU\u30e1\u30e2\u30ea\u4f7f\u7528\u7387\u306a\u3069\u3092\u76e3\u8996\u3059\u308b\u3068\u304d\u3068\u304b\u306b\u306f\u4f7f\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<p>\u306a\u3093\u304b\u3082\u3063\u3068\u3046\u307e\u3044\u4f7f\u3044\u65b9\u306a\u3044\u304b\u306a\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3063\u3066\u4fbf\u5229\u3067\u3059\uff0e\u3063\u3066\u3044\u3046\u6587\u8a00\u3092\u3044\u308d\u3093\u306a\u3068\u3053\u308d\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\uff0cPython\u306e\u826f\u3044\u3068\u3053\u308d\u306f\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u3067\u8272\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u3061\u3083\u3046\u3068\u3053\u308d\u3067\u3059\uff0e\u4eca\u56de\u306f\u305d\u306e\u4e00\u3064\u3068\u3057\u3066\uff0c\u300cPython\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3084\u308d\u3046\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3067\u3059\uff0e<\/p>\n","protected":false},"author":1,"featured_media":968,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[50],"_links":{"self":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/963"}],"collection":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":7,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"predecessor-version":[{"id":971,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/963\/revisions\/971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media\/968"}],"wp:attachment":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/tags?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}