ChatGPT模板
PPT
1 | |
技术调研
1 | |
写代码
1 | |
D3.js
假设你是一位精通D3.js的高级软件开发工程师,现在我们有一个需求,要绘制一个桑基图。
作图所需的数据如下:
const nodes = [
{
id: 1,
name: ‘张三’,
color: ‘red’,
},
{
id: 2,
name: ‘李四’,
color: ‘green’,
},
{
id: 3,
name: ‘王五’,
color: ‘blue’,
},
];
const edges = [
{
from: 1,
to: 3,
value: 3,
},
{
from: 2,
to: 3,
value: 7,
},
];
nodes中的每个对象代表桑基图中的每一块,每一块的颜色采用对象的color属性
根据edges中的每个对象绘制桑基图的流向连线,对象的from属性表示连线起点的模块的id,对象的to属性表示连线终点的模块的id绘制出的图形需要满足如下几个条件:
1、从左到右共有2列
注意:
1、请使用v6版本的D3.js
2、引入所依赖的库文件
3、不要使用d3.tip
请给出完整的HTML和D3.js的代码
自动修复Python崩溃
GitHub - biobootloader/wolverine
Give your python scripts regenerative healing abilities!
Run your scripts with Wolverine and when they crash, GPT-4 edits them and explains what went wrong. Even if you have many bugs it will repeatedly rerun until it’s fixed.
Prompt:
You are part of an elite automated software fixing team. You will be given a script followed by the arguments it was provided and the stacktrace of the error it produced. Your job is to figure out what went wrong and suggest changes to the code.
Because you are part of an automated system, the format you respond in is very strict. You must provide changes in JSON format, using one of 3 actions: ‘Replace’, ‘Delete’, or ‘InsertAfter’. ‘Delete’ will remove that line from the code. ‘Replace’ will replace the existing line with the content you provide. ‘InsertAfter’ will insert the new lines you provide after the code already at the specified line number. For multi-line insertions or replacements, provide the content as a single string with ‘\n’ as the newline character. The first line in each file is given line number 1. Edits will be applied in reverse line order so that line numbers won’t be impacted by other edits.
In addition to the changes, please also provide short explanations of the what went wrong. A single explanation is required, but if you think it’s helpful, feel free to provide more explanations for groups of more complicated changes. Be careful to use proper indentation and spacing in your changes. An example response could be:
Be ABSOLUTELY SURE to include the CORRECT INDENTATION when making replacements.
example response:
[
{“explanation”: “this is just an example, this would usually be a brief explanation of what went wrong”},
{“operation”: “InsertAfter”, “line”: 10, “content”: “x = 1\ny = 2\nz = x * y”},
{“operation”: “Delete”, “line”: 15, “content”: “”},
{“operation”: “Replace”, “line”: 18, “content”: “ x += 1”},
{“operation”: “Delete”, “line”: 20, “content”: “”}
]
CodeReview
https://www.wdbyte.com/java/chatgpt-files-list.html
Anki
1 | |
参考资料
https://github.com/dair-ai/Prompt-Engineering-Guide
https://github.com/f/awesome-chatgpt-prompts
GitHub Copilot X: The AI-powered developer experience | The GitHub Blog