成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

如何將 ipynb 發(fā)布到 blog 中?

zhigoo / 3372人閱讀

摘要:如何將發(fā)布到中原文是也乎原未天然就內置了這種能力

Title: 如何將 ipynb 發(fā)布到 blog 中?
Date: 2014-11-27
Tags: Pythonic,FW,ipynb,tutorial
Slug: 141127-ipynb-into-blog

原文: prooffreader plus: How to quickly turn an IPython notebook into a blog post

IPython notebooks are great for many things, but they"re a little awkward to embed in blog post platforms like Blogger, Wordpress, etc. When the nbconvert feature was a standalone command-line tool, there was a blog export template, but that seems to have disappeared now that nbconvert has been folded within IPython.

Out of the box, nbconvert just has two html export options:

--html

which includes a lot of CSS that interferes with a blog"s CSS, and:

--html --template basic

which has no CSS and so pretty much negates the benefit of using an IPython notebook. However, it does have CSS classess in the text.

My solution was to whip up a quick CSS stylesheet that could be included in the blog post. It seems to work pretty well; you can have a look at:

an IPython notebook in nbviewer of a recent blog post of mine

the blog version after applying this stylesheet.

Note that, for aesthetic reasons, I removed all the

In [1]

-style tags because of the narrow columns on this blog. Your mileage may vary.

1. Convert .ipynb notebook to HTML

In the terminal, navigate to the folder containing the .ipynb file and type:

ipython nbconvert --to html --template basic filename.ipynb
2. Paste HTML in blog

Note: if you"re using the Blogger platform, never switch back to the Compose interface after you use the HTML interface, it changes all your tags.

3. Add CSS to blog HTML

This seems to reproduce the native syntax highlighting of IPython.


是也乎

原未 IPy[:] notebook 天然就內置了這種能力!

Changelog

140107 move into Pelican as zoomquiet.io

131106 pub. EKR to Chinese programmer — I. M. H. O. — Medium

文章版權歸作者所有,未經(jīng)允許請勿轉載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉載請注明本文地址:http://m.hztianpu.com/yun/37468.html

相關文章

  • 打造數(shù)據(jù)科學作品集:搭建一個數(shù)據(jù)科學博客

    摘要:讀完本文,你將學會如何使用靜態(tài)網(wǎng)站生成器,搭建一個屬于自己的博客,用來展示數(shù)據(jù)科學作品。靜態(tài)網(wǎng)站基本上,一個靜態(tài)網(wǎng)站就是一個全是文件的文件夾。建立靜態(tài)網(wǎng)站的一種方法是手寫,然后上傳所有的文件到服務器。 這是「打造數(shù)據(jù)科學作品集」系列文章的第二篇。如果你喜歡該系列,而且想知道下一篇文章什么時候發(fā)布,你可以訂閱我們。讀完本文,你將學會如何使用 Pelican 靜態(tài)網(wǎng)站生成器,搭建一個屬于...

    iamyoung001 評論0 收藏0
  • 8步從Python白板專家,從基礎深度學習

    摘要:去吧,參加一個在上正在舉辦的實時比賽吧試試你所學到的全部知識微軟雅黑深度學習終于看到這個,興奮吧現(xiàn)在,你已經(jīng)學到了絕大多數(shù)關于機器學習的技術,是時候試試深度學習了。微軟雅黑對于深度學習,我也是個新手,就請把這些建議當作參考吧。 如果你想做一個數(shù)據(jù)科學家,或者作為一個數(shù)據(jù)科學家你想擴展自己的工具和知識庫,那么,你來對地方了。這篇文章的目的,是給剛開始使用Python進行數(shù)據(jù)分析的人,指明一條全...

    Zachary 評論0 收藏0
  • 數(shù)據(jù)分析遇PDF文本,怎么用Python批量提取內容

    摘要:復雜系統(tǒng)仿真的微博客虛假信息擴散模型研究面向影子分析的社交媒體競爭情報搜集面向人機協(xié)同的移動互聯(lián)網(wǎng)政務門戶探析經(jīng)驗證。微博客的企業(yè)競爭情報搜集移動社交媒體用戶隱私保護對策研究注意這里的提示,原先的個文件沒有被再次抽取,只有個新文件被抽取。 showImg(https://segmentfault.com/img/bVbiU7y?w=1000&h=508); 本文為你展示,如何用Pyth...

    cloud 評論0 收藏0
  • [原]深入對比數(shù)據(jù)科學工具箱:Python和R 的 Web 編輯器

    摘要:概述工欲善其事必先利其器,如果現(xiàn)在要評選數(shù)據(jù)科學中最好用的編輯器注意一定是可以通過訪問的,和一定是角逐的最大熱門,正確使用編輯器可以很大地提升我們的工作效率。 概述 showImg(https://segmentfault.com/img/bVAdol); 工欲善其事必先利其器,如果現(xiàn)在要評選數(shù)據(jù)科學中最好用的Web 編輯器(注意一定是可以通過Web訪問的),RStudio和Jupyt...

    RobinQu 評論0 收藏0
  • 遷移學習在圖像分類的簡單應用策略

    摘要:地址為什么使用遷移學習根據(jù)聯(lián)合創(chuàng)始人斯坦福副教授吳恩達介紹,遷移學習將會成為機器學習商業(yè)成就的下一驅動力。遷移學習是一種機器學習技術,允許在特定的數(shù)據(jù)集上再利用已訓練的卷積神經(jīng)網(wǎng)絡,并將其調整或遷移到其他數(shù)據(jù)集。 GitHub 地址:https://github.com/miguelgfierro/sciblog_support/blob/master/A_Gentle_Introducti...

    BigNerdCoding 評論0 收藏0

發(fā)表評論

0條評論

閱讀需要支付1元查看
<