史上超强 Python 编辑器,竟然是张网页?!

俗话说,磨刀不误砍柴工,要想闯荡编程世界,一套趁手的编辑器是必不可少的。对 Python 语言的使用者来说,不论你是刚开始学习编程知识的萌新小蛇,还是已经有了许多编程经验的巨蟒大佬,今天介绍的这款神器,一定能给你的学习、工作带来许多助益。

<bi style=”box-sizing: border-box; display: block;”>——当然,前提是你能正常访问 Google 的服务。</bi>

我需要什么样的编辑器?

世上并不存在绝对完美的编辑器,但就日常使用需求而言,起码需要满足以下几点,才算是一款“老少咸宜”的优秀的编辑器:

  1. 安装配置难度低
  2. 用户不需要很复杂的设置或调整系统选项,就能运行良好。相比之下,一些功能强大的专业 IDE 例如 Eclipse 就需要耗费许多时间进行安装和配置。
  3. 易用性好
  4. 学习曲线一定要平缓,不能一来就把新用户给吓跑了。VIM 编辑器可以说是非常厉害了,然而第一次使用的时候,你可能连退出都搞不定。
  5. 功能强大
  6. 除了必备的代码着色,各种运行调试功能也不能少。想来应该不会有人用记事本写代码吧?
  7. 包括版本管理或团队协作功能
  8. 其实这算是一个锦上添花的功能,团队协作能让多人共同完成任务,版本控制可以让你方便地追踪回退你的代码版本,这也为开发大规模应用打下良好的基础。

好了,卖了这么多关子,下面容我向你郑重推荐这款超强的 Python 编辑器——Google Colaboratory!

可以添加QQ群1004391443,有飞机大战、颜值打分器、打砖块小游戏、红包提醒神器、小姐姐表白神器等具体的实训项目,有清晰源码,有相应的文件

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702159 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

这就是个网页!?

没错,Colab 是一个免费的 Jupyter Notebook 环境(你可以想成是网页版多功能笔记本),它不需要进行任何设置就可以使用,并且完全在云端运行。

你可以在这个网页上编写和执行代码、保存和共享分析结果,并利用 Google 提供的强大计算资源处理数据,所有这些都可通过浏览器免费使用。

别不相信,我这就带你详细了解一下:

界面友好

在详细介绍它的强大功能之前,我们先来认识一下 Colab 的界面。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702166 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

和 Jupyter Notebook 一样,Colab 的编辑界面也是以“单元格”为基本单位,每个单元格都是“代码”或“文字”其中之一。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702171 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

代码单元格自带代码着色,可以开启行号显示、缩进字符调整等功能,还能直接在页面上运行代码,运行结果会直接显示在代码单元格下方。除了 Python 代码外,Colab 还支持解析 html 标记,运行 bash 命令等。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702178 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

如果代码有问题,则会显示一些精心着色并格式化了的错误信息,帮助你找到出错的地方——甚至还很贴心地提供了一个“一键求助”按钮,让你能在 stackoverflow.com 上搜索对应的出错信息。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702183 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

文字单元格用于在代码之间添加描述性文字,你可以用它解释代码内容、做笔记、写论文,你可以用 Markdown 标记语言来给单元格内的文字添加格式,甚至插入图片等。

这种图文并茂,代码和数据交相辉映的显示方式,非常适合学习 Python 的新手,以及搞数据分析的科学家们。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702189 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

怎么样,在这样的界面上写代码是不是很简洁明快呀?

此外,作为一个网页版的编辑器,它无需安装和过多配置,基本上达到了“开箱即用”,写完就能运行的效果,降低了初学者入门的门槛,也节省了老手开始工作前的配置时间。再加上云服务天生的跨平台跨设备特性,不管是台式机、笔记本、平板电脑甚至手机,只要有网络的地方,你都能随时继续手头的工作,绝对不会丢失数据。

功能强大

在平易近人的外表下,隐藏的是一颗强大的芯。

在代码中,你不但可以用 Python 语言引入各种标准库供你使用,还可以利用 bash 语言的支持,手动安装你需要的各类第三方库。甚至连数据分析用的 Pandas、Numpy,机器学习的 TensorFlow 等都已经内置了。

不仅如此,和跑在自己电脑上的 Jupyter Notebook 环境最大不同之处是,Colab 使用的是 Google 的后台运行时服务,这就相当于你拥有了一台随时待命的专属服务器。这个服务器自带有 12G的内存和50G的硬盘空间,用于容纳、处理你的数据和代码。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702195 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

比如,当你在坐车或者是无聊的会议当中的时候,突然想到一个点子,“我这样构建我的模型行不行?”在以往,只有轻便的上网本或者手机的时候,虽然这些设备的算力可以解决一些微小数据集上的问题,但如果要将模型用于大数据集的时候肯定是需要额外算力的。那么在 5G 网络等等的基础上,你可以用手机通过 Colab 直接连上服务器,用 Google 的算力来运算你对模型的调整。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702201 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

为了用户能更高效地运行调整机器学习代码,Google 还提供了一些 GPU(Tesla K80)和 TPU(据说是八核心的TPU v2)的加速硬件,你只需要在笔记本设置里启用,就可以用到这些额外的运算能力——按照机器之心网站的测试,用 CPU 迭代一次需要运行 2.44 秒的代码,用 GPU 只需要约 280 毫秒,而通过修改代码调用 TPU 进行运算,类似的工作量只需要 1.22 毫秒!这几乎快了 2000 倍呢!

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702205 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

最后,Google Colab 最大的优势还在于,它通过云计算让用户摆脱了装备的限制,再也不用担心自己的电脑太烂,不管什么设备,只要能连上 Google 的网络服务,就可以使用云端的虚拟机,处理云端的数据集。

当然,如果你嫌 Google 提供的运行时不够快,或是需要长时间挂着执行高速运算,你也可以在界面上选择连接到电脑本地的代码执行程序,用你自定义的软件/硬件来处理你存放在 Colab 上的代码。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702211 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

协作与代码管理

实时协作可以算是 Google 一向的强项啦。在 Colab 里,你可以像分享普通的 Google 文档或电子表格一样,通过邮件邀请或是分享链接的方式,让其他人阅读/参与到你的代码工作中来。

你也可以通过往 Google 云端硬盘上传/下载笔记本文件(.ipynb)的方式,分享、保存、发送你的笔记本的所有内容(文本、代码和输出项)。当然,你可以在“笔记本设置”里选择在保存或分享笔记本时忽略代码单元格输出项,让页面更加简洁。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702217 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

此外,Colab 还支持基于检查点的历史版本管理,你可以方便地回退历史记录,查询修改情况,还能接入 Github 代码库,把代码上传到 Github 仓库或者 gist 里,管理、共享你的代码和分析成果。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702223 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

有趣的小彩蛋

最新版本的 Colab 支持换肤功能(……),你可以在设置里选择深色或者浅色的主题背景(据说深色主题能大大增强你的编程水平),选择柯基模式会让你的标题栏出现两只奔跑的柯基,选择威力等级(超强power模式),可以让你的每次键盘输入都震动整个窗口……

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702227 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

我能用它做什么?

如果你是刚开始学习 Python 的新人,那它是你入门学习语言的最好工具之一。无需安装配置,即开即用的 Python 环境,能让你方便快捷地测试自己的学习代码,并且在同一个页面里直观地看到程序的输出内容。这能够极大地加快试错和探索的速度,让你更快地掌握新语言的特性。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702231 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

如果你是计算机专业的教师,Colab 甚至提供了一套布置、批改作业的系统,利用笔记本能把题目、代码、运行结果整合在同一个页面上的功能,你可以方便地查看每道问题的作答情况,并对具体单元格进行审阅、批注、打分。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702237 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

如果你是计算机科学家,Colab 这种自带云计算、方便协作的环境能极大地提高你的工作效率。

在数据分析方面,Google 给出了在 Colab 里使用 Pandas 处理数据,并进行分析的详细教程,你可以使用类似的方法读取在线数据集中的数据,并进行分析。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702245 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

在神经网络框架方面,TensorFlow 官方就放出了几个例子,其中让人最印象深刻的是在 Colab 上调用神经网络自动分析图像识别癌症的实例。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556003702248 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《史上超强 Python 编辑器,竟然是张网页?!》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

此外,对于机器学习的研究者,在实际工作中往往会遇到“在什么时候该用什么样的模型”的问题,特别是在调试具体模型时,往往会有很多操作细节是调用者所不明白的。在这种情况下,云计算端口能够提供的是一个合作的窗口,通过共享工作笔记本的形式,其他人可以直接对你的模型提出具体的调整建议。

怎么样,对这个超强的“大玩具”,你心动了吗?

快去colab.research.google.com试一试吧!

    原文作者:不谈风月_0eb8
    原文地址: https://www.jianshu.com/p/535d1afc4036
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞