运行npm google-play-scraper软件包,在上面搜索约2000个应用程序,并将其保存到mongodb。
X = torch.tensor([[[0.,0.,0.],[1.,0.,0.],[3.,0.,0.]]],requires_grad=True)
adjacency_matrix = (X.unsqueeze(2)-X.unsqueeze(1)).norm(dim=3)
Y = torch.matmul(adjacency_matrix,adjacency_matrix)
grad1 = torch.autograd.grad(Y.sum(),X,create_graph=True)[0]
grad2 = torch.autograd.grad(grad1.sum(),X,create_graph=True)[0]
print(grad2)
结果:
var gplay = require("google-play-scraper");
var MongoClient = require("mongodb").MongoClient;
var url = "mongodb://localhost:27017/";
var appIds = require("./appId");
console.log(appIds.length);
appIds.forEach(appId => {
gplay
.app({ appId: appId })
.then(details =>
MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) {
if (err) throw err;
var dbo = db.db("google-play");
console.log("found");
})
)
.catch(() =>
MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) {
if (err) throw err;
var dbo = db.db("google-play");
console.log("notfound");
})
);
});
尝试迭代100个应用程序,但效果很好。但是当我为2k应用程序运行时,会发生错误。