사용자 도구

사이트 도구


jupyter

문서의 이전 판입니다!


Jupyter

notebook 코드 감추기 & '코드 감추기' 버튼 추가

import IPython.core.display as di
 
# This line will hide code by default when the notebook is exported as HTML
di.display_html('<script>jQuery(function() {if (jQuery("body.notebook_app").length == 0) { jQuery(".input_area").toggle(); jQuery(".prompt").toggle();}});</script>', raw=True)
 
# This line will add a button to toggle visibility of code blocks, for use with the HTML export version
di.display_html('''<button onclick="jQuery('.input_area').toggle(); jQuery('.prompt').toggle();">Toggle code</button>''', raw=True)
jupyter.1472719480.txt.gz · 마지막으로 수정됨: 2024/03/23 02:37 (바깥 편집)