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
from konlpy.tag import Twitter | |
tw = Twitter() | |
result = tw.pos('존경하고 사랑하는 국민 여러분, 감사합니다. 국민 여러분의 위대한 선택에 머리숙여 깊이 감사드립니다.') | |
print(result) | |
''' | |
Dict는 표제어를 가짐 |
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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def on_deploy(self, event, context): | |
data = self.get_user_data() | |
stack_id = data['stack_id'] | |
client = self.get_boto_client(data) | |
response = client.describe_apps(StackId=stack_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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def on_layers(self, event, context): | |
data = self.get_user_data() | |
stack_id = data['stack_id'] | |
client = self.get_boto_client(data) | |
response = client.describe_layers(StackId=stack_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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def on_stacks(self, event, context): | |
data = self.get_user_data() | |
client = self.get_boto_client(data) | |
response = client.describe_stacks() | |
stacks = [(s['StackId'], s['Name']) for s in response['Stacks']] |
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
from bothub_client.bot import BaseBot | |
class Bot(BaseBot): | |
def on_start(self, event, context): | |
message = Message(event) | |
message.set_text('\n'.join([ | |
"Hello, I'm OpsworksBot.", | |
'', | |
'I help you to manage Opsworks with ease. You can navigate stacks and layers, execute a deployment with me.', | |
'', |
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
# -*- coding: utf-8 -*- | |
from bothub_client.bot import BaseBot | |
class Bot(BaseBot): | |
def set_credentials(self, event, context, access_token, secret_access_token): | |
data = self.get_user_data() | |
data['credentials'] = { | |
'aws_access_key_id': access_token, | |
'aws_secret_access_key': secret_access_token, |
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
programming-language: python3 | |
intents: | |
credentials: | |
slots: | |
- id: access_token | |
question: Please tell me your access token | |
- id: secret_access_token | |
question: Please tell me your secret access key |
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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def handle_message(self, event, context): | |
content = event['content'] | |
if content.startswith('/'): | |
if content == '/start': | |
self.send_start_message(event) |
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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def handle_message(self, event, context): | |
content = event['content'] | |
if content.startswith('/'): | |
if content.startswith('/list'): | |
self.send_word_list(event) |
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
from bothub_client.bot import BaseBot | |
from bothub_client.messages import Message | |
class Bot(BaseBot): | |
def handle_message(self, event, context): | |
content = event['content'] | |
self.count_word(content) | |
self.search_word(event) |
NewerOlder