postman上传
//Content-Length:375
Content-Type:multipart/form-data
form-data key 和原请求的对应
2023-05-13-23-37-55
不用shell新开终端窗口时执行的.bashXxx是不一样的,一直以为mac也是 .bashrc
但要看shell
1 | echo $SHELL |
是 /bin/zsh
所以要写在 ~/.zshrc
里,终于弄清楚了!
2023-05-06-17-03-01
govendor 项目,goland的 Go -> Go Modules -> Enable Go modules integration 不能勾选
2023-04-28-14-52-03
content-length导致的问题
1 | -H 'Content-Length: 107' \ |
在go里直接用exec执行curl,用replace替换参数来快速造数据,结果一直遇到
1 | {"code":400,"desc":"\u003cMalformed.JSON\u003e error at parsing json: unexpected end of JSON input","errcode":"Malformed.JSON","type":"Malformed"} |
一直以为是json参数有问题,但最后才明白,是Content-Length还是之前的,没重新计算导致的
2023-04-25-10-27-50
重定向,如果 >> 不生效,可能是因为程序使用了标准错误输出,就使用 >> nohup.out 2>&1
1 | while true; do /usr/local/ones-ai-bi-sync/bin/etl/ones-bi-sync-etl -s status >> nohup.out 2>&1; LD_LIBRARY_PATH='' clickhouse-client -m --port 8122 --user default --password default --query "SELECT value / (1024 * 1024) AS value_MB FROM system.metrics WHERE metric = 'MemoryTracking';" >> nohup.out; sleep 5; done |
2023-04-24-11-26-21
1 | cd ~ |
2023-04-18-14-43-49
获取gorountine id
1 | func GetGoid() int64 { |
2023-04-15-14-44-33
yum 安装clickhouse一直报证书校验错误的问题,有缓存
1 | find /var/lib/yum/repos/ /var/cache/yum/ -name 'clickhouse-*' -type d -exec rm -rf {} + |
2023-03-04-17-34-36
centos 安装 trojan记录
从shadowsock上复制配置
点击齿轮图标 icon-config.png 打开单节点的配置窗口,点击 复制配置 即可复制节点配置
ssl 的 verfiy 改为 false,我觉得应该不用改,可以验证一下启动后我以为就是设置http_proxy为127.0.0.1:1080
其实不是,1080是socks5的,要再下载一个privoxy1
2yum install -y privoxy
改privoxy配置
1
2
3
4vim /etc/privoxy/config
# 末尾增加下面内容,/后面是代理服务器的地址:端口,注意最后还有个.
forward-socks5t / 127.0.0.1:1080 .启动privoxy
1
systemctl start privoxy
设置http_proxy
1
2
3export https_proxy=http://127.0.0.1:8118
export http_proxy=http://127.0.0.1:8118
export all_proxy=http://127.0.0.1:8118这时再去访问openai网站
1
2
3
4
5
6
7
8curl https://api.openai.com/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'
2023-03-02-23-18-13
GPT-3是由OpenAI开发的自然语言处理模型,于2020年发布。以下是相关论文列表:
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., … & Amodei, D. (2020). Language models are few-shot learners. arXiv preprint arXiv:2005.14165.
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., & Sutskever, I. (2019). Language models are unsupervised multitask learners. OpenAI blog, 1(8), 9.
Radford, A., Narasimhan, K., Salimans, T., & Sutskever, I. (2018). Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openai-assets/researchcovers/languageunsupervised/language_understanding_paper. pdf.
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., … & Amodei, D. (2020). A large-scale study of representation learning with the transformer model. arXiv preprint arXiv:2012.15723.
其中,Brown等人在第一篇论文中介绍了GPT-3的设计和实现,提出了“few-shot learning”的思路,并通过大量实验验证了该模型的优异表现;而Radford等人在第二、三篇论文中提出了基于无监督学习的预训练方法,并演示了其在多任务学习和生成领域的应用;最后一篇论文则是对GPT-3模型进行了更深入的实验研究,探究了其表示学习能力和泛化性能等方面的特点。