{"id":204,"date":"2020-04-03T02:51:34","date_gmt":"2020-04-02T18:51:34","guid":{"rendered":"http:\/\/i.pegasi.top\/?p=204"},"modified":"2020-04-03T03:07:07","modified_gmt":"2020-04-02T19:07:07","slug":"%e5%85%b3%e4%ba%8ewin7%e8%ae%b0%e4%ba%8b%e6%9c%ac%e7%9a%84%e4%b8%80%e4%b8%aa%e5%9d%91","status":"publish","type":"post","link":"https:\/\/i.pegasi.top\/index.php\/2020\/04\/03\/%e5%85%b3%e4%ba%8ewin7%e8%ae%b0%e4%ba%8b%e6%9c%ac%e7%9a%84%e4%b8%80%e4%b8%aa%e5%9d%91\/","title":{"rendered":"\u5173\u4e8ewin7\u8bb0\u4e8b\u672c\u7684\u4e00\u4e2a\u5751"},"content":{"rendered":"<p>\u5927\u5b66\u5f00\u5b66\uff0c\u7f51\u8bfe\u5728\u5bb6\u3002\u6700\u8fd1\u6709\u95e8\u8bfe\u8981\u6c42\u4f7f\u7528Jupyter Notebook\u6765\u5199python\u7684\u7a0b\u5e8f\u3002\u4f46\u662f\u56e0\u4e3a\u7b14\u8005\u5bb6\u91cc\u7684\u7834\u7535\u8111\u5f00\u4e2a\u6d4f\u89c8\u5668\u90fd\u8981\u5361\u534a\u5929\uff0c\u6709\u7684\u65f6\u5019\u61d2\u5f97\u53bb\u542f\u52a8Jupyter Notebook\uff0c\u5c31\u56fe\u7701\u4e8b\u60f3\u76f4\u63a5\u7528\u8bb0\u4e8b\u672c\u6253\u5f00\u7f16\u8f91\u4e00\u4e0b\u4ee3\u7801\u3002\u7136\u540e\u5c31\u2026\u2026\u62a5\u9519\uff01<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-large aligncenter\" src=\"http:\/\/t.pegasi.top\/imgs\/2020\/04\/c1fa604effc2450d.png\" width=\"338\" height=\"229\" \/><\/p>\n<p>\u4e00\u5f00\u59cb\u8fd8\u4ee5\u4e3a\u662f\u4e0d\u5c0f\u5fc3\u52a8\u4e86\u4ec0\u4e48\u4e1c\u897f\uff0c\u67e5\u4e86\u4e00\u4e0b\u7f51\u9875\u5927\u90e8\u5206\u7ed3\u679c\u90fd\u8bf4\u662f\u7834\u574f\u4e86json\u7684\u7ed3\u6784\u4ec0\u4e48\u7684\uff0c\u4e5f\u6709\u9053\u7406\u3002\u7136\u800c\uff0c\u6211\u628a\u6587\u4ef6\u6587\u672c\u4e22\u7ed9json\u68c0\u6d4b\u662f\u901a\u8fc7\u7684\u3002\u8fd9\u5c31\u5f88\u795e\u5947\u4e86\uff0c\u8981\u4e0d\u6211\u4ec0\u4e48\u90fd\u4e0d\u52a8\u5c31\u6253\u5f00-\u4fdd\u5b58-\u5173\u95ed\uff1f\u53d1\u73b0\u7ed3\u679c\u4f9d\u65e7\u662f\u8fd9\u6837\u3002<\/p>\n<p>\u7ec6\u5fc3\u7684\u540c\u5b66\u53ef\u80fd\u53d1\u73b0\u4e86\uff0c\u8fd9\u4e2a\u6587\u4ef6\u600e\u4e48\u662f\u4ee5\\ufeff\u5f00\u5934\u7684\uff1f\u4e4b\u524d\u6ca1\u52a8\u8fc7\u7684\u6587\u4ef6\u6709\u8fd9\u4e2a\u5417\uff1f\u4e8e\u662f\uff0c\u6211\u505a\u4e86\u4e00\u4e2a\u5b9e\u9a8c\uff0c\u4f7f\u7528Jupyter Notebook\u65b0\u5efa\u4e86\u4e00\u4e2aipynb\u6587\u4ef6\u2026\u2026<img decoding=\"async\" loading=\"lazy\" class=\"size-large aligncenter\" src=\"http:\/\/t.pegasi.top\/imgs\/2020\/04\/7102a634ba620df9.png\" width=\"441\" height=\"181\" \/><\/p>\n<p>\u4e4b\u540e\u4fdd\u5b58\u4e3aUntitled.ipynb\uff0c\u5e76\u590d\u5236\u4e00\u4efd\u4e3aUntitled2.ipynb\u3002\u7528\u8bb0\u4e8b\u672c\u6253\u5f00Untitled2.ipynb\uff0c\u4e0d\u505a\u4efb\u4f55\u7f16\u8f91\uff0c\u4fdd\u5b58\uff0c\u5173\u95ed\u3002<\/p>\n<p>\u7ed3\u679c\u4e5f\u5728\u9884\u6599\u4e4b\u4e2d\uff0cUntitled.ipynb\u80fd\u6b63\u5e38\u5728Jupyter Notebook\u4e2d\u6253\u5f00\uff0c\u800cUntitled2.ipynb\u5c31\u62a5\u9519\u4e86\u3002<\/p>\n<p>\u4e3a\u4e86\u67e5\u627e\u539f\u56e0\u4e0e\u201c\u4fee\u590d\u6587\u4ef6\u201d\u7684\u65b9\u6cd5\uff0c\u6211\u5728\u540c\u76ee\u5f55\u4e0b\u8bd5\u7740\u7528python\u8bfb\u4e86\u4e00\u4e0b\u4e24\u4e2a\u6587\u4ef6\u3002\u7b80\u5355\u7684\u4ee3\u7801\u5982\u4e0b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n\r\nf=open(&quot;Untitled.ipynb&quot;,&quot;r&quot;,encoding=&quot;utf-8&quot;)\r\ng=open(&quot;Untitled2.ipynb&quot;,&quot;r&quot;,encoding=&quot;utf-8&quot;)\r\n\r\na=f.read()\r\nb=g.read()\r\n\r\n<\/pre>\n<p>\u6700\u540e\u7684\u53d8\u91cfa\u4e0eb\u4e2d\u7684\u503c\u5206\u522b\u4e3a\uff1a<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\na='{\\n &quot;cells&quot;: [\\n {\\n &quot;cell...\r\nb='\\ufeff{\\n &quot;cells&quot;: [\\n {\\n &quot;cell...\r\n<\/pre>\n<p>\u770b\u51fa\u6765\u4e86\u5417\uff1fb\u4e2d\u5f00\u5934\u591a\u4e86\\ufeff\uff0c\u8fd9\u662f\u8868\u793a\u7f16\u7801\u7684\u5b57\u8282\u5e8f\u7684\u4e00\u4e2a\u6807\u8bc6\u3002\u53ef\u662f\u901a\u5e38\u6765\u8bf4\uff0cUTF-8\u662f\u53ef\u4ee5\u6807\u660e\u5b57\u8282\u987a\u5e8f\u7684\uff0c\u5f53\u7136\u901a\u5e38\u4e5f\u4e0d\u9700\u8981\u6807\u660e\uff0c\u4e0d\u50cf\u5176\u4ed6\u7684\u7f16\u7801\u6709\u5927\u5c0f\u7aef\u7684\u56e0\u7d20\u3002\u800cwin7\u8bb0\u4e8b\u672c\u5728\u4fdd\u5b58\u7684\u65f6\u5019\uff0c\u8ba4\u4e3a\u8fd9\u662fUTF-8\u7f16\u7801\u7684\u6587\u672c\u6587\u4ef6\uff0c\u4e8e\u662f\u5c31\u5728\u5f00\u5934\u52a0\u4e86\\ufeff\uff08\u6765\u544a\u8bc9\u4e4b\u540e\u8bbf\u95ee\u8fd9\u4e2a\u6587\u672c\u7684\u8bb0\u4e8b\u672c\u8fd9\u662f\u4e2aUTF-8\u5199\u7684\u4e1c\u897f\uff09\u3002\u800cJupyter Notebook\uff08Win7\u73af\u5883\uff0cWin10\u4f3c\u4e4e\u6ca1\u95ee\u9898\uff09\u4f3c\u4e4e\u4e0d\u5403\u8fd9\u5957\uff0c\u5b83\u4ece\u6765\u4e0d\u5199\\ufeff\uff0c\u4e5f\u770b\u4e0d\u61c2\uff0c\u4e8e\u662f\u5c31\u62a5\u9519\u4e86\u3002\u8fd9\u548c\u8bb0\u4e8b\u672c\u7684\u201c\u5199\u201d\u3001\u201c\u8054\u901a\u201dbug\u6709\u5f02\u66f2\u540c\u5de5\u4e4b\u5999\u3002<\/p>\n<p>\u90a3\u539f\u56e0\u77e5\u9053\u4e86\uff0c\u600e\u4e48\u4fee\u590d\u5462\uff1f\u5176\u5b9e\u5341\u5206\u7b80\u5355\uff0c\u53bb\u6389\u5f00\u5934\u4e0d\u5c31\u597d\u4e86\u561b\u3002\u7b80\u5355\u7528python\u6574\u4e86\u8fd9\u4e48\u4e00\u6bb5\uff1a<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">g=open(&quot;Untitled2.ipynb&quot;,&quot;r&quot;,encoding=&quot;utf-8&quot;)\r\nh=open(&quot;FixedUntitled2.ipynb&quot;,&quot;w&quot;,encoding=&quot;utf-8&quot;)\r\nh.write(g.read()[1:])\r\nh.close()\r\ng.close()<\/pre>\n<p>\u8fd9\u6837FixedUntitled2.ipynb\u53c8\u53ef\u4ee5\u88abJupyter Notebook\u8bc6\u522b\u4e86\uff0c\u6211\u4eec\u7684\u95ee\u9898\u4e5f\u5c31\u89e3\u51b3\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5b66\u5f00\u5b66\uff0c\u7f51\u8bfe\u5728\u5bb6\u3002\u6700\u8fd1\u6709\u95e8\u8bfe\u8981\u6c42\u4f7f\u7528Jupyter Notebook\u6765\u5199python\u7684\u7a0b\u5e8f\u3002\u4f46\u662f\u56e0\u4e3a\u7b14\u8005\u5bb6\u91cc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,11],"tags":[],"views":3588,"_links":{"self":[{"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/posts\/204"}],"collection":[{"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":4,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/posts\/204\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/posts\/204\/revisions\/208"}],"wp:attachment":[{"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/categories?post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i.pegasi.top\/index.php\/wp-json\/wp\/v2\/tags?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}