ai驱动数据安全治理_JupyterLab中的AI驱动的代码完成

ai驱动数据安全治理

As a data scientist, you almost surely use a form of Jupyter Notebooks. Hopefully, you have moved over to the goodness of JupyterLab with its integrated sidebar, tabs, and more. When it first launched in 2018, JupyterLab was great but felt it was missing some things.

作为数据科学家,您几乎可以肯定使用某种形式的Jupyter笔记本。 希望您已将JupyterLab的优势与集成的侧边栏,选项卡等一起使用。 当JupyterLab于2018年首次推出时,它很棒,但感觉它缺少一些东西。

Now you can add a visual debugger and there is even a library called nbdev that allows you to author full Python packages and push them to PyPI. JupyterLab has become a complete IDE for data scientists. But one thing was still sub-optimal until recently, code completions.

现在,您可以添加一个视觉调试器 ,甚至还有一个名为nbdev的库,该库可让您编写完整的Python程序包并将其推送到PyPI。 JupyterLab已成为数据科学家的完整IDE。 但是直到最近,代码完成仍然是次优的。

Trying to use the built-in code completion in JupyterLab gets you something like this:

尝试在JupyterLab中使用内置的代码完成功能会为您提供以下信息:

Image for post
When you do really ever want the absolute value of a whole dataframe?
当您真的想要整个数据框的绝对值时?

Kite, a company that makes code completion software for a variety of languages and IDE’s, recently launched Kite for JupyterLab. Now you can get something like this:

风筝 ,一个公司,使代码完成软件适用于各种语言和IDE的,最近推出的风筝JupyterLab。 现在,您可以获得以下内容:

Image for post
That makes much more sense.
这更有意义。

Simplify your life with logical autocompletion. It runs locally and doesn’t send your code to the cloud.

逻辑自动完成功能可简化您的生活。 它在本地运行,不会将您的代码发送到云中。

Image for post
Yes, I DO want plt.plot(). Thanks.
是的,我确实想要plt.plot()。 谢谢。

It isn’t perfect, and it certainly doesn’t read your mind. It IS a good upgrade for the default code completion though.

它不是完美的,并且肯定不会读懂你的想法。 对于默认代码完成,这是一个很好的升级。

Kite for JupyterLab brings you one step closer to a full notebook based IDE.

适用于JupyterLab的Kite使您距离基于笔记本的完整IDE更近了一步。

如何为JupyterLab安装Kite (How to Install Kite for JupyterLab)

Installing Kite for JupyterLab is fairly painless.

为JupyterLab安装Kite相当简单。

  1. First, install Kite for Desktop. You can get the installer here. Versions are available for Windows, Mac, and Linux.

    首先,安装桌面版Kite。 您可以在此处获取安装程序。 这些版本适用于Windows,Mac和Linux。

  2. Make sure your JupyterLab is version 2.2 or later. This is a pretty recent version of JupyterLab so you may need to upgrade with your install with conda or pip.

    确保您的JupyterLab是2.2或更高版本。 这是JupyterLab的最新版本,因此您可能需要使用condapip进行安装升级

  3. Install the JupyterLab extension. You will need NodeJS installed just like for your other extensions.

    安装JupyterLab扩展。 与其他扩展一样,您将需要安装NodeJS。
pip install jupyter-kitejupyter labextension install "@kiteco/jupyterlab-kite"

到目前为止的经验 (My experience so far)

I’ve only used Kite for JupyterLab for about a week now. It’s not groundbreaking, but it certainly makes my coding experience that much better. Completions are noticeably faster than the native completions as well.

我仅在JupyterLab上使用Kite已有大约一周的时间。 这不是开创性的,但是肯定可以使我的编码体验好得多。 完成的速度也明显快于本地完成的速度。

I’m using the free version of Kite, and the completions take place 100% locally. The best suggestion for me isn’t always at the top, but it’s usually in the top 5. As data scientists, we use LOTS of methods, and this is a nice way to get reminders when needed.

我使用的是免费版本的Kite,补全在本地100%完成。 对我来说,最好的建议并不总是排在最前面,而是通常排在前5位。作为数据科学家,我们使用很多方法,这是在需要时获得提醒的一种好方法。

Happy coding!

编码愉快!

Robert Ritz is a Data Scientist and educator based in Ulaanbaatar, Mongolia. He can be reached at robertritz@outlook.com.

罗伯特·里兹(Robert Ritz)是位于蒙古乌兰巴托的数据科学家和教育家。 可以通过robertritz@outlook.com与他联系。

翻译自: https://towardsdatascience.com/ai-powered-code-completion-in-jupyterlab-53e53850080c

ai驱动数据安全治理

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值