我有一个 y 轴刻度的折线图,刻度为 5,我希望网格线的步长/间隔为 1。我看不到明显的方法,无论如何在chart.js 中实现这个?
提前致谢!
我正在尝试访问安全的云运行服务。如果我在我的机器上使用 SDK 尝试它工作正常:
curl --header "Authorization: Bearer $(gcloud auth print-identity-token)"
但是,我无法使用 Python API 使用相同的服务帐户使其工作,我尝试使用 google-auth 获取访问令牌,但这给了我 401 身份验证错误。这是我用来尝试获取令牌的代码:
import google.auth
import google.auth.transport.requests
scopes = ['https://www.googleapis.com/auth/cloud-platform']
creds, projects = google.auth.default(scopes=scopes)
auth_req = google.auth.transport.requests.Request()
creds.refresh(auth_req)
# then using creds.token
Run Code Online (Sandbox Code Playgroud)
查看文档:https : //cloud.google.com/run/docs/authenticating/service-to-service#calling_from_outside_gcp它说要遵循此处的示例代码:https : //cloud.google.com/iap/docs /authentication-howto#iap_make_request-python我似乎无法按照指南进行操作,因为它说启用 IAP 但似乎 IAP 仅适用于应用程序引擎而不适用于云运行?
有没有人对此有任何建议?
谢谢
python google-authentication google-cloud-platform google-cloud-run