Skip to content

Instantly share code, notes, and snippets.

@zgpeace
Created February 20, 2023 15:54
Show Gist options
  • Save zgpeace/604fca7591f33f12eeb8bdb71f59292e to your computer and use it in GitHub Desktop.
Save zgpeace/604fca7591f33f12eeb8bdb71f59292e to your computer and use it in GitHub Desktop.
ChatGPT Register

地址:https://chat.openai.com/

1. 登陆上去体验

写代码问题

Could you help me to write a C++ function to upload a file to ASW S3?

在这里插入图片描述 回复 带代码和注释

Sure, here is an example of how you might write a C++ function to upload a file to Amazon S3:

#include <aws/core/Aws.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/PutObjectRequest.h>
#include <fstream>

using namespace Aws::S3;

void upload_file_to_s3(const std::string &file_name,
                       const std::string &bucket_name,
                       const std::string &key_name)
{
    Aws::SDKOptions options;
    Aws::InitAPI(options);

    S3Client s3_client;

    PutObjectRequest put_request;
    put_request.SetBucket(bucket_name);
    put_request.SetKey(key_name);

    std::shared_ptr<Aws::IOStream> input_data =
        Aws::MakeShared<Aws::FStream>("PutObjectInputStream",
                                      file_name.c_str(),
                                      std::ios_base::in | std::ios_base::binary);
    put_request.SetBody(input_data);

    auto put_object_outcome = s3_client.PutObject(put_request);

    if (put_object_outcome.IsSuccess())
    {
        std::cout << "Successfully uploaded file " << file_name << " to S3 bucket "
                  << bucket_name << "/" << key_name << std::endl;
    }
    else
    {
        std::cout << "Error uploading file " << file_name << " to S3 bucket "
                  << bucket_name << "/" << key_name << ": "
                  << put_object_outcome.GetError().GetMessage() << std::endl;
    }

    Aws::ShutdownAPI(options);
}

This function takes the name of the file to upload, the name of the S3 bucket, and the key (i.e. the file name) to use in the bucket. It uses the AWS SDK for C++ to create an S3Client and then uses that client to create a PutObjectRequest with the specified bucket and key. It then sets the body of the request to be the contents of the specified file, and uses the PutObject method of the client to upload the file. If the upload is successful, it prints a success message, otherwise it prints an error message.

Note that this is just an example and may need to be modified to fit your specific needs and use case. For example, you may want to add error handling or additional configuration options. You will also need to make sure that you have the necessary AWS credentials and permissions to upload files to S3. For more information, please see the AWS SDK for C++ documentation.

2. 注册账号

注意:需要科学上网,大陆、香港都不行,最好选择美国。 在这里插入图片描述 输入邮箱和密码 在这里插入图片描述 登陆邮箱验证 在这里插入图片描述 点击Verify email address 在这里插入图片描述 输入昵称 在这里插入图片描述 输入国外手机验证,这里暂停一下,需要跳转到https://sms-activate.org/?ref=2930289 获取手机 在这里插入图片描述

2.1 sms-activate 注册,获取手机验证码

进去网站,点击注册,如果为别国语音,右上角切换为中国 https://sms-activate.org/?ref=2930289 在这里插入图片描述 点击右上角余额 > 充值 在这里插入图片描述 选择支付宝, 在这里插入图片描述 在这里插入图片描述 激活,选择OpenAI,选择India,印度的手机号 在这里插入图片描述 点击购物车

在这里插入图片描述 点击复制手机号到OpenAI 注册页面,获取验证码 在这里插入图片描述

2.2 切换回OpenAI注册页面

在这里插入图片描述 在这里插入图片描述

2.3 切换回sms-activate 查看,一会就可以看到验证码

在这里插入图片描述

2.4 切换到OpenAI注册页面,填入验证码

在这里插入图片描述 选择任意一个,注册成功。 在这里插入图片描述 进入OpenAI 页面,点击Try it 进入登陆页面 在这里插入图片描述

2.5 登陆ChatGPT

点击Login 在这里插入图片描述

在这里插入图片描述 终于可以使用 ChatGPT 在这里插入图片描述 在下面的输入框,输入问题,即可得到ChatGPT的回复 在这里插入图片描述

3. Chrome 插件 ChatGPT for Google

https://chrome.google.com/webstore/detail/chatgpt-for-google/jgjaeacdkonaoafenlfkkkmbaopkbilf 在这里插入图片描述 下次google的时候,右侧栏会有ChatGPT的答案。 在这里插入图片描述 比如输入

how to get artificial intelligence architect jobs

ChatGPT:

To become an artificial intelligence architect, you will need a strong background in computer science and experience working with artificial intelligence technologies. You should have a deep understanding of machine learning algorithms, data modeling, and software engineering. In addition, you should be familiar with the latest trends and developments in the field of AI.

To get a job as an AI architect, you can start by earning a bachelor's or master's degree in computer science or a related field. You can then gain experience by working on AI-related projects, such as building machine learning models or developing AI applications. You can also gain valuable experience by working as a software engineer or data scientist, where you will have the opportunity to work with AI technologies and develop your skills in this area.

Once you have the necessary education and experience, you can search for AI architect jobs on job websites, such as LinkedIn or Glassdoor. You can also network with other professionals in the field, attend industry conferences, and join professional organizations to learn about job opportunities and make connections with potential employers.

Overall, becoming an AI architect requires a combination of education, experience, and networking. By pursuing a relevant degree and gaining experience in the field, you can position yourself for a successful career as an AI architect.

中文搜索 如何获得人工智能架构师的工作 在这里插入图片描述 ChatGPT:

如果你想成为人工智能架构师,那么你需要具备一定的技能和经验。首先,你应该拥有计算机科学或相关学科的学士学位。其次,你应该掌握人工智能、机器学习、数据挖掘和数据分析等技术。此外,你还应该熟悉深度学习、神经网络等人工智能技术的原理和应用。

要成为一名优秀的人工智能架构师,你还需要具备一定的分析能力和解决问题的能力,以及良好的沟通能力和团队协作能力。

一般来说,你可以通过参加培训课程、实习机会或工作经验来提升自己的技能和经验。你还可以通过获得相关的认证,如“人工智能架构师”(Certified Artificial Intelligence Architect)等,来增加自己的竞争力。

总之,想要成为人工智能架构师,需要良好的学习能力和技术能力,并不断提升自己的技能和经验。

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment