https://configure.zsa.io/planck-ez/layouts/bJnV7/latest/0 https://configure.ergodox-ez.com/planck-ez/layouts/yElpl/latest/5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
TOKEN = "xoxb-12345678-12345679-thairoo1airi6om7Ahga" | |
def main(): | |
url = "https://slack.com/api/users.list?token=" + TOKEN | |
response = requests.get(url) | |
response.raise_for_status() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from selenium import webdriver | |
def lambda_handler(event, context): | |
chrome=Chrome() | |
chrome.get('https://www.google.com/') | |
print(chrome.title) | |
chrome.quit() | |
return { | |
'statusCode': 200, |
python list_all_slack_id.py xoxp-000000000000-abcdef
output will be like
https://slack.com/api/channels.list?token=xoxp-000000000000-abcdef
https://slack.com/api/usergroups.list?token=xoxp-000000000000-abcdef
https://slack.com/api/users.list?token=xoxp-000000000000-abcdef
{'CB0000000': 'general',
'CB0000000': 'random',
'UB0000000': 'umihico',
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto3 | |
""" | |
API gateway URL example. You have to allow your quicksight domin setting to be accessed from amazonaws.com including subdomains. | |
https://xxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/xxx-gateway-stage-xxxx/your-lambda-func-name?dashboard_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxx | |
""" | |
def lambda_handler(event, context): | |
dashboard_id=event["queryStringParameters"]['dashboard_id'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"A Coru\u00f1a": "Spain", "Aachen": "Germany", "Aalborg": "Denmark", "Aarhus": "Denmark", "Aba, Nigeria": "Nigeria", "Abadan, Iran": "Iran", "Abaetetuba": "Brazil", "Abakan": "Russia", "Abbotabad": "Pakistan", "Abbotsford, British Columbia": "Canada", "Abengourou": "Ivory Coast", "Abeokuta": "Nigeria", "Aberdeen": "United Kingdom", "Abha": "Saudi Arabia", "Abidjan": "Ivory Coast", "Abiko, Chiba": "Japan", "Abilene, Texas": "United States", "Abohar": "India", "Abu Al-Khaseeb": "Iraq", "Abu Dhabi": "United Arab Emirates", "Abu Ghraib": "Iraq", "Abuja": "Nigeria", "A\u00e7ail\u00e2ndia": "Brazil", "Acapulco": "Mexico", "Acarigua": "Venezuela", "Accra": "Ghana", "Achalpur": "India", "Acheng District": "China", "Achinsk": "Russia", "Adama": "Ethiopia", "Adana": "Turkey", "Adapazar\u0131": "Turkey", "Addis Ababa": "Ethiopia", "Adelaide": "Australia", "Aden": "Yemen", "Adhamiyah": "Iraq", "Adilabad": "India", "Adityapur": "India", "Ad\u0131yaman": "Turkey", "Ado-Ekiti": "Nigeria", "Adoni": "India", "Afyon": "Turkey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import base64 | |
def lambda_handler(event, content): | |
response = requests.get("https://github.com/umihico.png") | |
return { | |
"isBase64Encoded": True, | |
"statusCode": 200, | |
"headers": { "content-type": "image/jpg"}, | |
"body": base64.b64encode(response.content).decode("utf-8") | |
} |
- run
docker-compose up
. - confirm you get
PIL
andPillow-6.1.0.dist-info
directory next .yml file. - upload them as AWS Lambda Layer