{"id":316,"date":"2018-05-30T12:01:30","date_gmt":"2018-05-30T12:01:30","guid":{"rendered":"http:\/\/163.180.4.222\/lab\/?p=316"},"modified":"2018-05-30T12:01:30","modified_gmt":"2018-05-30T12:01:30","slug":"%ec%bb%b4%ed%93%a8%ed%84%b0-%ea%b4%80%eb%a0%a8-%ed%8c%8c%ec%9d%b4%ec%8d%ac%ec%9c%bc%eb%a1%9c-%ec%9e%91%ec%84%b1%ed%95%9c-tree-%ed%95%98%ec%9c%84-%eb%94%94%eb%a0%89%ed%86%a0%eb%a6%ac-%ea%b5%ac","status":"publish","type":"post","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=316","title":{"rendered":"\ucef4\ud4e8\ud130 \uad00\ub828 &#8211; \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ud55c tree (\ud558\uc704 \ub514\ub809\ud1a0\ub9ac \uad6c\uc870\ub97c \ubcf4\uc5ec\uc90c) \ud30c\uc77c"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>import glob, os.path<br \/>\nndir = nfile = 0<\/p>\n<p>def traverse(dir, depth):<br \/>\n(space)global ndir, nfile<br \/>\n(space)for obj in glob.glob(dir + &#8216;\/*&#8217;):<br \/>\n(space)(space)if depth == 0:<br \/>\n(space)(space)(space)prefix = &#8216;|&#8211;&#8216;<br \/>\n(space)(space)else:<br \/>\n(space)(space)(space)prefix = &#8216;|&#8217; + &#8216; &#8216; * depth + &#8216;|&#8211;&#8216;<br \/>\n(space)(space)if os.path.isdir(obj):<br \/>\n(space)(space)(space)ndir += 1<br \/>\n(space)(space)(space)print(prefix + os.path.basename(obj))<br \/>\n(space)(space)(space)traverse(obj, depth + 1)<br \/>\n(space)(space)elif os.path.isfile(obj):<br \/>\n(space)(space)(space)nfile += 1<br \/>\n(space)(space)(space)print(prefix + os.path.basename(obj))<br \/>\n(space)(space)else:<br \/>\n(space)(space)(space)print(prefix + &#8216;unknown object :&#8217;, obj)<\/p>\n<p>if __name__ == &#8216;__main__&#8217;:<br \/>\n(space)traverse(&#8216;.&#8217;, 0)<br \/>\n(space)print(&#8216;\\n&#8217;, ndir, &#8216;directories,&#8217;, nfile, &#8216;files&#8217;)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; &nbsp; import glob, os.path ndir = nfile = 0 def traverse(dir, depth): (space)global ndir, nfile (space)for obj in glob.glob(dir + &#8216;\/*&#8217;): (space)(space)if depth<a href=\"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=316\" class=\"more-link\">(more&#8230;)<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":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}},"categories":[35,29],"tags":[9,3],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-lets-do-computer-science","category-lets-do-science","tag-lets-do-computer-science","tag-lets-do-science"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":318,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=318","url_meta":{"origin":316,"position":0},"title":"\ucef4\ud4e8\ud130 \uad00\ub828 &#8211; \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ud55c \uc778\uacf5\uc9c0\ub2a5 \uac8c\uc784 \ud30c\uc77c","author":"biochemistry","date":"May 30, 2018","format":false,"excerpt":"\u00a0 \u00a0 \u00a0 \ucf54\uc778 \uac8c\uc784\u00a0-- \ub9c8\uc9c0\ub9c9 \ucf54\uc778\uc744 \ube7c\ub294 \uc790\uac00 \uc9c0\ub294 \uac8c\uc784 \u00a0 # This is a variant of the Game of Bones recipe given in the easyAI library from easyAI import TwoPlayersGame, id_solve, Human_Player, AI_Player from easyAI.AI import TT class LastCoinStanding(TwoPlayersGame): (space)def __init__(self, players): # Define the players. Necessary parameter.\u2026","rel":"","context":"In &quot;Let's Do Computer Science!&quot;","block_context":{"text":"Let's Do Computer Science!","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=35"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3300,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=3300","url_meta":{"origin":316,"position":1},"title":"The NASA Twins Study: A multidimensional analysis of a year-long human spaceflight","author":"biochemistry","date":"April 14, 2019","format":false,"excerpt":"\u00a0 \u00a0 What to expect after a year in space \u00a0 Space is the final frontier for understanding how extreme environments affect human physiology. Following twin astronauts, one of which spent a year-long mission on the International Space Station, Garrett-Bakelman\u00a0et al.\u00a0examined molecular and physiological traits that may be affected by\u2026","rel":"","context":"In &quot;Let's Do Biology!&quot;","block_context":{"text":"Let's Do Biology!","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=33"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2714,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=2714","url_meta":{"origin":316,"position":2},"title":"Why are there so many laws of physics?","author":"biochemistry","date":"February 22, 2019","format":false,"excerpt":"\u00a0 \u00a0 The real theory of everything might be \u201cthe question to which the universe is the answer\u201d. Plus: why some US researchers are taking their gene-edited livestock abroad. \u00a0 A Different Kind of Theory of Everything Physicists used to search for the smallest components of the universe. What if\u2026","rel":"","context":"In &quot;Essays on Science&quot;","block_context":{"text":"Essays on Science","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=32"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1189,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=1189","url_meta":{"origin":316,"position":3},"title":"All together now\u2026fly!","author":"biochemistry","date":"July 20, 2018","format":false,"excerpt":"\u00a0 \u00a0 (\uc6d0\ubb38: \uc5ec\uae30\ub97c \ud074\ub9ad\ud558\uc138\uc694~) \u00a0 Science\u00a0\u00a020 Jul 2018: Vol. 361, Issue 6399, pp. 240 DOI: 10.1126\/science.361.6399.240-a \u00a0 \u00a0 \u00a0Open in new tab Long-exposure photo of a flight with multiple drones CREDIT: ZSOLT B\u00c9ZSENYI \u00a0 \u00a0 Can the quick, responsive grace of a flock of birds or school of fish\u2026","rel":"","context":"In &quot;Let's Do Computer Science!&quot;","block_context":{"text":"Let's Do Computer Science!","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=35"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":878,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=878","url_meta":{"origin":316,"position":4},"title":"The artist who walked on the Moon: Alan Bean","author":"biochemistry","date":"June 11, 2018","format":false,"excerpt":"\u00a0 \u00a0 (\uc6d0\ubb38) \u00a0 \u00a0 Richard Taylor pays tribute to the Apollo astronaut who beautifully meshed science and art. \u00a0 \u00a0 \u00a0 Apollo 12 astronaut Alan Bean\u2019s 1994 painting\u00a0Kissing the Earth\u00a0was inspired by the view as he and his team began their descent to the Moon in 1969. \u00a0 In\u2026","rel":"","context":"In &quot;Essays on Science&quot;","block_context":{"text":"Essays on Science","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=32"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3241,"url":"https:\/\/biochemistry.khu.ac.kr\/lab\/?p=3241","url_meta":{"origin":316,"position":5},"title":"Walk the line (QUANTUM TECHNOLOGY)","author":"biochemistry","date":"April 8, 2019","format":false,"excerpt":"\u00a0 \u00a0 Qubits made from semiconductor quantum dots are a potential platform for future quantum computing. Although quantum gates with high fidelity have been demonstrated, the coupling of such qubits over distances, for example for use in quantum registers, remains a challenge. Mills et al. now show how they can\u2026","rel":"","context":"In &quot;Let's Do Chemistry!&quot;","block_context":{"text":"Let's Do Chemistry!","link":"https:\/\/biochemistry.khu.ac.kr\/lab\/?cat=34"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":false,"jetpack_shortlink":"https:\/\/wp.me\/p9Xo1j-56","_links":{"self":[{"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316"}],"version-history":[{"count":0,"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions"}],"wp:attachment":[{"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/biochemistry.khu.ac.kr\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}