vscode使用chatGPT 的方法
作者:土豆煮石头 时间:2022-10-10 15:55:38
vscode使用chatGPT
一、下载chatPGT
在拓展中找到chatGPT,我这里下载的是中文版
二、使用
1.使用快捷键 ctrl
+shift
+p
进行查找 chatGPT
2.点击请输入问题
3.输入你的问题,回车,这样它就会进行代码的编写
4.等一会儿就会给你结果啦
三、现在来看看它写的怎样
生成的代码
import smtplib
# 设置发送方的邮件服务器和端口号
smtp_server = "smtp.qq.com"
smtp_port = 465
# 建立与邮件服务器的连接
server=smtplib.SMTP_SSL("smtp.qq.com", 465)
# server = smtplib.SMTP(smtp_server, smtp_port)
# 启用安全连接
server.starttls()
# 登录到邮件服务器
server.login("1256960051@qq.com", "xxxxx")
# 设置电子邮件的收件人,主题和内容
to = "1256960051@qq.com"
subject = "Hello!"
body = "Hello, world!"
# 组装并发送电子邮件
message = f"Subject: {subject}\n\n{body}"
server.sendmail("1256960051@qq.com", to, message)
# 断开与邮件服务器的连接
server.quit()
是不是十分简洁,还有代码的解释和为什么用这种方法,是不是很有用呢?
来源:https://www.cnblogs.com/zbfoot/p/16968902.html
标签:vscode,chatGPT
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python把图片转化为pdf代码实例
2021-04-05 19:06:36
详细HTTP协议的前世今生
2022-05-16 20:33:26
![](https://img.aspxhome.com/file/2023/4/132404_0s.jpg)
打造通用ASP.NET数据分页控件
2007-08-18 13:27:00
![](https://img.aspxhome.com/file/UploadPic/up/2007081814254184.jpg)
关于配置babel-plugin-import报错的坑及解决
2023-07-02 16:39:01
![](https://img.aspxhome.com/file/2023/2/139752_0s.png)
浅谈JS原生Ajax,GET和POST
2024-04-16 08:52:41
Mysql导出数据的正确方法
2024-01-22 11:24:06
![](https://img.aspxhome.com/file/2023/7/116757_0s.jpg)
Python中xlsx文件转置操作详解(行转列和列转行)
2022-02-18 03:36:34
![](https://img.aspxhome.com/file/2023/0/92310_0s.jpg)
基于mysql 默认排序规则的坑
2024-01-17 11:38:56
vuex实现的简单购物车功能示例
2024-05-08 10:43:19
Spring + mybatis + mysql使用事物的几种方法总结
2024-01-22 02:01:25
js仿支付宝多方框输入支付密码效果
2024-04-26 17:12:49
![](https://img.aspxhome.com/file/2023/0/135630_0s.gif)
Python实现调用摄像头拍摄照片
2021-01-22 12:22:25
![](https://img.aspxhome.com/file/2023/5/133465_0s.png)
详解opencv中画圆circle函数和椭圆ellipse函数
2023-08-10 22:11:40
![](https://img.aspxhome.com/file/2023/9/64679_0s.png)
mysql缓冲和缓存设置详解
2024-01-27 02:39:18
Python多进程同步简单实现代码
2021-05-17 23:48:04
virtualenv介绍及简明教程
2023-07-04 08:46:33
Python编程中的异常处理教程
2022-10-16 04:26:23
python 执行文件时额外参数获取的实例
2022-09-24 05:46:54
Tensorflow tf.nn.atrous_conv2d如何实现空洞卷积的
2023-03-29 11:05:43
![](https://img.aspxhome.com/file/2023/4/126894_0s.png)
JavaScript检测实例属性, 原型属性
2024-04-18 09:40:54