我陷入了"Amazon Cognito Identity用户池"流程.
我尝试了所有可能的代码来验证cognito用户池中的用户.但我总是得到错误说"错误:无法验证客户端4b*******fd的秘密哈希".
这是代码:
AWS.config.region = 'us-east-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:b64bb629-ec73-4569-91eb-0d950f854f4f'
});
AWSCognito.config.region = 'us-east-1';
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:b6b629-er73-9969-91eb-0dfffff445d'
});
AWSCognito.config.update({accessKeyId: 'AKIAJNYLRONAKTKBXGMWA', secretAccessKey: 'PITHVAS5/UBADLU/dHITesd7ilsBCm'})
var poolData = {
UserPoolId : 'us-east-1_l2arPB10',
ClientId : '4bmsrr65ah3oas5d4sd54st11k'
};
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var userData = {
Username : 'ronakpatel@gmail.com',
Pool : userPool
};
var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
cognitoUser.confirmRegistration('123456', true,function(err, result) {
if (err) {
alert(err);
return;
}
console.log('call result: ' + result);
});
Run Code Online (Sandbox Code Playgroud) 我使用pymongo的SQL'Like'运算符,
db.test.find({'c':{'$regex':'ttt'}})
Run Code Online (Sandbox Code Playgroud)
但是我如何使用'不喜欢'运算符?
我试过了
db.test.find({'c':{'$not':{'$regex':'ttt'}})
Run Code Online (Sandbox Code Playgroud) from joblib import Parallel, delayed
def func(v):
temp.append(v)
return
temp = []
Parallel(n_jobs=4)(delayed(func)(v) for v in range(10))
print temp
Run Code Online (Sandbox Code Playgroud)
我想让共享内存变量。但是temp的值为空[]。我该怎么做?
对于其他方法,我尝试了 pickle.dump 和 load。但是有一个锁定问题。请给我建议!