{"id":8734,"date":"2022-07-14T13:29:00","date_gmt":"2022-07-14T04:29:00","guid":{"rendered":"https:\/\/taki-lab.site\/bocci\/?p=8734"},"modified":"2022-07-17T13:42:25","modified_gmt":"2022-07-17T04:42:25","slug":"%e3%80%90%e6%95%b0%e5%ad%a6%e3%80%91%e3%80%90python%e3%80%9110%e9%80%b2%e6%95%b0%e3%82%922%e9%80%b2%e6%95%b0%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=8734","title":{"rendered":"\u3010\u6570\u5b66\u3011\u3010Python\u301110\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\u3059\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Python\u3060\u3063\u305f\u3089<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>taki@DESKTOP-4VF3GEO:~\/python$ python\nPython 2.7.18 (default, Mar  8 2021, 13:02:45) \n&#91;GCC 9.3.0] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; bin(26)\n'0b11010'\n&gt;&gt;&gt; <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3068\u3044\u3046\u611f\u3058\u3067\u5909\u63db\u51fa\u6765\u308b\u3093\u3067\u3059\u304c\u3001\u3042\u3048\u3066\u30ed\u30b8\u30c3\u30af\u3067\u7d44\u3093\u3067\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import sys\n\nargs = sys.argv\n\nprint(args)\ndef dec2bin(target):\n    division = target\n    amari = &#91;]\n\n    while division != 0:\n        amari.append(division % 2)\n        division = division \/\/ 2\n    \n    amari.reverse()\n    return amari\n\nprint(dec2bin(int(args&#91;1])))\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>taki@DESKTOP-4VF3GEO:~\/python$ python dec2bin.py 26\r\n&#91;'dec2bin.py', '26']\r\n&#91;1, 1, 0, 1, 0]\r\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f15\u6570\u3092division\u306b\u7f6e\u304d\u63db\u3048\u3066\u3044\u308b\u306e\u306f\u3001\u5f15\u6570\u306b\u8a08\u7b97\u7d50\u679c\u3092\u4ee3\u5165\u3059\u308b\u306e\u306f\u3088\u308d\u3057\u304f\u306a\u3044\u3068\u3044\u3046\u8003\u3048\u306e\u5143\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3060\u3063\u305f\u3089 \u3068\u3044\u3046\u611f\u3058\u3067\u5909\u63db\u51fa\u6765\u308b\u3093\u3067\u3059\u304c\u3001\u3042\u3048\u3066\u30ed\u30b8\u30c3\u30af\u3067\u7d44\u3093\u3067\u307f\u307e\u3059\u3002 \u5f15\u6570\u3092division\u306b\u7f6e\u304d\u63db\u3048\u3066\u3044\u308b\u306e\u306f\u3001\u5f15\u6570\u306b\u8a08\u7b97\u7d50\u679c\u3092\u4ee3\u5165\u3059\u308b\u306e\u306f\u3088\u308d\u3057\u304f\u306a\u3044\u3068\u3044\u3046\u8003\u3048\u306e\u5143\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2806,3],"tags":[],"class_list":["post-8734","post","type-post","status-publish","format-standard","hentry","category-python","category-3"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8SDbY-2gS","jetpack-related-posts":[{"id":8790,"url":"https:\/\/taki-lab.site\/bocci\/?p=8790","url_meta":{"origin":8734,"position":0},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u301110\u9032\u6570\u309216\u9032\u6570\u306b\u5909\u63db\u3059\u308b","author":"taki","date":"2022\u5e747\u670822\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=8734 \u3053\u3061\u3089\u3082\u540c\u3058\u3088\u3046\u306bhex(2\u2026","rel":"","context":"Python","block_context":{"text":"Python","link":"https:\/\/taki-lab.site\/bocci\/?cat=2806"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8834,"url":"https:\/\/taki-lab.site\/bocci\/?p=8834","url_meta":{"origin":8734,"position":1},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u301110\u9032\u6570\u306b\u5909\u63db\u3059\u308b","author":"taki","date":"2022\u5e747\u670827\u65e5","format":false,"excerpt":"\u3053\u308c\u3082 >>> int('0b11010', 2) 26 >>> int('0x1A', 16) 2\u2026","rel":"","context":"Python","block_context":{"text":"Python","link":"https:\/\/taki-lab.site\/bocci\/?cat=2806"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3881,"url":"https:\/\/taki-lab.site\/bocci\/?p=3881","url_meta":{"origin":8734,"position":2},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011CPU\u6e29\u5ea6\u3092Windows\u5074\u3067\u8868\u793a\u3059\u308b","author":"taki","date":"2020\u5e748\u670817\u65e5","format":false,"excerpt":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001\u30e9\u30ba\u30d1\u30a4\u306eCPU\u6e29\u5ea6\u3092\u53d6\u5f97\u3067\u304d\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001 https:\/\/taki-lab\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/505bfe4f2996feadac2b27f7cde6a5cf.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10545,"url":"https:\/\/taki-lab.site\/bocci\/?p=10545","url_meta":{"origin":8734,"position":3},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u3011\u884c\u5217\u306e\u9006\u884c\u5217\u3092\u6c42\u3081\u308b\u3002","author":"taki","date":"2023\u5e745\u67088\u65e5","format":false,"excerpt":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u3011\u884c\u5217\u306e\u304b\u3051\u7b97\u3092\u884c\u3046 | \u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f (taki-lab.sit\u2026","rel":"","context":"Python","block_context":{"text":"Python","link":"https:\/\/taki-lab.site\/bocci\/?cat=2806"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9276,"url":"https:\/\/taki-lab.site\/bocci\/?p=9276","url_meta":{"origin":8734,"position":4},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u3011\u4e09\u89d2\u95a2\u6570\u3092\u4f7f\u3063\u3066\u5186\u3092\u63cf\u753b\u3059\u308b","author":"taki","date":"2022\u5e7410\u67085\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=9198 import matplot\u2026","rel":"","context":"Python","block_context":{"text":"Python","link":"https:\/\/taki-lab.site\/bocci\/?cat=2806"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-02-102245.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-02-102245.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-02-102245.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-02-102245.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-02-102245.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":10070,"url":"https:\/\/taki-lab.site\/bocci\/?p=10070","url_meta":{"origin":8734,"position":5},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u3011\u30d9\u30af\u30c8\u30eb\u306e\u65b9\u5411\u3092\u6c42\u3081\u308b","author":"taki","date":"2023\u5e742\u67082\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=9978 \u30d9\u30af\u30c8\u30eb\u304c\u793a\u3059\u5ea7\u6a19(x,y)\u2026","rel":"","context":"Python","block_context":{"text":"Python","link":"https:\/\/taki-lab.site\/bocci\/?cat=2806"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2023\/01\/993e4d9533607bebf14169a859c40f8c.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8734"}],"version-history":[{"count":2,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8734\/revisions"}],"predecessor-version":[{"id":8789,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8734\/revisions\/8789"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}