Skip to content

Instantly share code, notes, and snippets.

View hawkerfun's full-sized avatar
🏠
Working from home

Sergei Khazov hawkerfun

🏠
Working from home
View GitHub Profile
@hawkerfun
hawkerfun / ListsTheUsersInTheAmazonCognitoUserPool.py
Created May 9, 2020 02:05
ListsTheUsersInTheAmazonCognitoUserPool
import boto3
import datetime
# Amazon Cognito User Pool Configs
LIMIT = 60
REGION = 'us-east-1'
USER_POOL_ID = 'us-east-1_aaaaaaaaa'
# Create boto3 CognitoIdentityProvider client
client = boto3.client('cognito-idp', REGION)
@hawkerfun
hawkerfun / gist:492780904bbe8c9a69a3feffa3a8088d
Created May 9, 2020 01:17
AWSCognitoUserPoolPaginationExample
$ aws --region us-east-1 cognito-idp list-users --user-pool-id us-east-1_aaaaaaaaa --limit 60 --pagination-token "AAAAAAAAAAAA......FS8="
{
"PaginationToken": "AAAAAAAAAAAAAAAAAAAAAAAAAAA/Ah/fAAAAAAAAAAAAPmvm3EtvdXCldvPxeFjLeyJAbiI6IlBhZ2luYXRpb25Db250aW51YXRpb25EVE8iLCJuZXh0S2V5IjoiQUFBQUFBQUFEbWgzQVFFQmlJU3pzVFV5UU1hOXlOemtyMFptalVlMzJPZmoxRU5BbGlkR0Q0YW9JRnhsYm1ZN01EQXdNRFppTldVdE9EZGxZUzAwTm1NMExXRTVNV1V0T1dJeFpXVmxaREJsWldNNE93PT0iLCJwcmV2aW91c1JlcXVlc3RUaW1lIjoxNTg4OTgxNzg4NzM1fRog+pNR1meJaIpnV4VAV6I4eDxha9uibDntnfRlMkThFS8=",
"Users": [
{
"Username": "0000aaaa-458b-aaaa-85c6-7a535a813aaa",
"Enabled": true,
"UserStatus": "CONFIRMED",
"UserCreateDate": 1545049623.5,
"UserLastModifiedDate": 1545049623.5,
"Attributes": [
@hawkerfun
hawkerfun / PredictX.js
Created April 18, 2018 13:19
PredictX created by hawkerfun1 - https://repl.it/@hawkerfun1/PredictX
class LetterModel {
constructor() {
this._adj_step = 0.001;
this._x = 5;
this._y = 5;
this._tries = 3000;
this._models = [];
}