{"id":8790,"date":"2022-07-22T19:00:00","date_gmt":"2022-07-22T10:00:00","guid":{"rendered":"https:\/\/taki-lab.site\/bocci\/?p=8790"},"modified":"2022-07-17T14:03:22","modified_gmt":"2022-07-17T05:03:22","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%9216%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=8790","title":{"rendered":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u301110\u9032\u6570\u309216\u9032\u6570\u306b\u5909\u63db\u3059\u308b"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-\u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f wp-block-embed-\u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ZiheJUD1UY\"><a href=\"https:\/\/taki-lab.site\/bocci\/?p=8734\">\u3010\u6570\u5b66\u3011\u3010Python\u301110\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\u3059\u308b<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010\u6570\u5b66\u3011\u3010Python\u301110\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\u3059\u308b&#8221; &#8212; \u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\" src=\"https:\/\/taki-lab.site\/bocci\/?p=8734&#038;embed=true#?secret=7YGpxJDdBx#?secret=ZiheJUD1UY\" data-secret=\"ZiheJUD1UY\" width=\"474\" height=\"267\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u3053\u3061\u3089\u3082\u540c\u3058\u3088\u3046\u306bhex(26)\u3092\u5b9f\u884c\u3059\u308c\u3070&#8217;0x1a&#8217;\u3092\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001<\/p>\n\n\n\n<p>\u3053\u308c\u3092Python\u306e\u30b3\u30fc\u30c9\u3067\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import sys\r\n\r\nargs = sys.argv\r\n\r\ndef dec2hex(target):\r\n    division = target\r\n    hex = &#91;]\r\n\r\n    while division != 0:\r\n        remainder_of = division % 16\r\n        division = division \/\/ 16\r\n        if remainder_of >= 10:\r\n            hex.append(chr(55 + remainder_of))\r\n        else:\r\n            hex.append(remainder_of)\r\n\r\n    hex.reverse()\r\n    return hex\r\n\r\nprint(dec2hex(int(args&#91;1])))\r\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>taki@DESKTOP-4VF3GEO:~\/python$ python dec2hex.py 26\r\n&#91;1, 'A']\r\n<\/code><\/pre>\n\n\n\n<p>\u3053\u3061\u3089\u3082\u30b5\u30f3\u30d7\u30eb\u3067\u306f[A-F]\u3092\u611a\u76f4\u306bif\u6587\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001<\/p>\n\n\n\n<p>A\u306fASCII\u30b3\u30fc\u30c9\u306765(0x41)\u306a\u306e\u3067\u300155\u306b\u4f59\u308a\u3092\u8db3\u3057\u3066chr\u3067\u5909\u63db\u3059\u308b\u3053\u3068\u3067[A-F]\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3061\u3089\u3082\u540c\u3058\u3088\u3046\u306bhex(26)\u3092\u5b9f\u884c\u3059\u308c\u3070&#8217;0x1a&#8217;\u3092\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001 \u3053\u308c\u3092Python\u306e\u30b3\u30fc\u30c9\u3067\u66f8\u304d\u307e\u3059\u3002 \u3053\u3061\u3089\u3082\u30b5\u30f3\u30d7\u30eb\u3067\u306f[A-F]\u3092\u611a\u76f4\u306bif\u6587\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001 A\u306fASCII\u30b3 &hellip; <a href=\"https:\/\/taki-lab.site\/bocci\/?p=8790\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u3010\u6570\u5b66\u3011\u3010PYTHON\u301110\u9032\u6570\u309216\u9032\u6570\u306b\u5909\u63db\u3059\u308b<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/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-8790","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-2hM","jetpack-related-posts":[{"id":8734,"url":"https:\/\/taki-lab.site\/bocci\/?p=8734","url_meta":{"origin":8790,"position":0},"title":"\u3010\u6570\u5b66\u3011\u3010Python\u301110\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\u3059\u308b","author":"taki","date":"2022\u5e747\u670814\u65e5","format":false,"excerpt":"Python\u3060\u3063\u305f\u3089 taki@DESKTOP-4VF3GEO:~\/python$ python P\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":8790,"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":912,"url":"https:\/\/taki-lab.site\/bocci\/?p=912","url_meta":{"origin":8790,"position":2},"title":"\u3010C\u8a00\u8a9e\u3011\u6574\u6570\u578b","author":"taki","date":"2019\u5e743\u670816\u65e5","format":false,"excerpt":"\u5909\u6570\u3092\u6271\u3046\u306b\u5f53\u305f\u3063\u3066\u3001\u91cd\u8981\u306a\u306e\u306f\u5909\u6570\u304c\u6271\u3048\u308b\u5024\u306e\u7bc4\u56f2\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u30c7\u30fc\u30bf\u578b\u306b\u3088\u3063\u3066\u3001\u5909\u6570\u304c\u6271\u2026","rel":"","context":"C\u8a00\u8a9e","block_context":{"text":"C\u8a00\u8a9e","link":"https:\/\/taki-lab.site\/bocci\/?cat=90"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/03\/3c008438b1cb6cb62025fce67045a3f8.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/03\/3c008438b1cb6cb62025fce67045a3f8.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/03\/3c008438b1cb6cb62025fce67045a3f8.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4807,"url":"https:\/\/taki-lab.site\/bocci\/?p=4807","url_meta":{"origin":8790,"position":3},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011WebAPI\u3067\u8d64\u5916\u7dda\u4fe1\u53f7\u3092\u9001\u4fe1\u3059\u308b","author":"taki","date":"2020\u5e7412\u670829\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=4683 https:\/\/taki-l\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\/12\/400b0ecc87fec1d57113db5b776b785c.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/12\/400b0ecc87fec1d57113db5b776b785c.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/12\/400b0ecc87fec1d57113db5b776b785c.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/12\/400b0ecc87fec1d57113db5b776b785c.jpg?resize=700%2C400 2x"},"classes":[]},{"id":3881,"url":"https:\/\/taki-lab.site\/bocci\/?p=3881","url_meta":{"origin":8790,"position":4},"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":9039,"url":"https:\/\/taki-lab.site\/bocci\/?p=9039","url_meta":{"origin":8790,"position":5},"title":"\u3010\u6570\u5b66\u3011\u3010PYTHON\u3011\u9023\u7acb\u65b9\u7a0b\u5f0f\u3092\u89e3\u304f","author":"taki","date":"2022\u5e748\u670823\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=8976 2\u70b9\u3092\u901a\u308b\u76f4\u7dda\u306e\u30b0\u30e9\u30d5\u3092\u66f8\u304f\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":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8790","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=8790"}],"version-history":[{"count":1,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8790\/revisions"}],"predecessor-version":[{"id":8792,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/8790\/revisions\/8792"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}