Google Colaboratoryã§NotebookãHTMLã«å¤æãã
Google Colaboratoryã¯ã©ãã§ãåãç°å¢ã§ä½æ¥ãã§ããã®ã§ä¾¿å©ã§ããï¼jupyter labã«ãããããªHTMLãã¦ã³ãã¼ãã®æ©è½ããªãããã§ãï¼
ããã§ä¸è¨ãåèã«ãã¾ããï¼
qiita.com
ãã ï¼ãã¡ã¤ã«ã®å ´æãèããããã¨ãã®ã¾ã¾ä½¿ããã¨ãåºæ¥ãªãã£ãã®ã§ï¼ãããæ¸ãæãã¾ããï¼
ä½åº¦ãæ¸ãæããã®ãé¢åãªã®ã§ï¼ãã®ããã°ã«æ¸ãä¸ãã¦ï¼ã³ãããã¦ä½¿ããããã«ãã¾ãï¼
from google.colab import files import re import shutil # ãã®ã¾ã¾HTMLåããã¨ä¸æ¸ãããã¦ãã¾ãã®ã§ï¼ä¸æ¦ã³ãã¼ãã dir = '/content/drive/MyDrive/ã»ã»ã»ã³ãã¼ããããã¡ã¤ã«ãæ ¼ç´ããã¦ãããã£ã¬ã¯ããªã»ã»ã»/' file_name = 'ã»ã»ã»ä»ä½¿ã£ã¦ãããã¡ã¤ã«ã®ååã»ã»ã».ipynb' fn = dir+'ã»ã»ã»ã³ãã¼å¾ã®ååã»ã»ã».ipynb' shutil.copyfile(dir+file_name , fn) # HTMLå fn_s = re.escape(fn) output_fn = fn.split('.', 1)[0]+'.html' output_fn_s = re.escape(output_fn) !jupyter nbconvert --to html $fn_s files.download(output_fn) !rm $fn_s