Pengcheng's Service调用帮助说明

OnlyOffice集成

OnlyOffice 可以与 Nextcloud、OwnCloud 等系统集成,以实现文档在线预览编辑与协同办公。

集成地址

https://office.pengcheng.team

秘钥

DM@NvlE6Ofjox01XU!v1M1CKliF93DQD

Docker镜像下载代理

由于国内纷纷关闭Docker镜像仓库,导致在国内无法下载Docker镜像
为了加速 Docker 镜像拉取,可以使用以下命令设置。

sudo tee /etc/docker/daemon.json <<EOF
{
    "registry-mirrors": ["https://docker.pengcheng.team"]
}
EOF
# 重载 Docker 配置
sudo systemctl  daemon-reload
# 重启 Docker 服务
sudo systemctl restart docker

使用该代理从拉取镜像

# 拉取 Docker-Hub上的Nginx最新镜像
# docker pull nginx:latest
latest: Pulling from library/nginx
f11c1adaa26e: Pull complete
c6b156574604: Pull complete
ea5d7144c337: Pull complete
1bbcb9df2c93: Pull complete
537a6cfe3404: Pull complete
767bff2cc03e: Pull complete
adc73cb74f25: Pull complete
Digest: sha256:67682bda769fae1ccf5183192b8daf37b64cae99c6c3302650f6f8bf5f0f95df
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

NSFWJS接口

NSFWJS 是一个基于 TensorFlow.js 的 JavaScript 库,可以在浏览器或 Node.js 环境中检测不适宜的图像内容。

接口地址

https://nsfwjs.pengcheng.team/classify

请求示例

属性字段:image

POST /classify HTTP/1.1
Content-Type: multipart/form-data

响应示例

HTTP/1.1 200 OK
Content-Type: application/jsoncode

{
  "drawing": 0.9432304501533508,
  "neutral": 0.04196060076355934,
  "hentai": 0.01332409493625164,
  "porn": 0.0012502941535785794,
  "sexy": 0.00023456310736946762
}

测试示例

curl -X POST https://nsfwjs.pengcheng.team/classify -F "image=@/root/background.jpg" | jq '.'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  299k  100   148  100  299k     52   105k  0:00:02  0:00:02 --:--:--  105k

{
  "drawing": 0.9432304501533508,
  "neutral": 0.04196060076355934,
  "hentai": 0.01332409493625164,
  "porn": 0.0012502941535785794,
  "sexy": 0.00023456310736946762
}