chatterbot on windows (No module named 'chatterbot_corpus' error)

chatterbot환경 setup  ModuleNotFoundError: No module named 'chatterbot_corpus' error가 발생할 경우의 대처 1. 환경준비     Centos 7.x     Anaconda Python 3.7 version 2. 에러 화면 PS C:\work\python\test> pip install -U PyYAML Collecting PyYAML   Using cached https://files.pythonhosted.org/packages/f5/93/b5ebdabc7e450418c26a1395d995d878a59bc4272d6ac63d2ada922126ad/PyYAML-5.1.1-cp37-cp37m-win_amd64.whl Installing collected packages: PyYAML   Found existing installation: PyYAML 5.1 Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead  to only a partial uninstall. PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--clien

make telegram bot

이미지
telegram bot만들기 python telegram으로 챗봇 만들기 1. 환경준비     Centos 7.x     python-telegram-bot 2. install  telegram-bot (base) [min@zepp ~]$ pip install python-telegram-bot --upgrade Requirement already up-to-date: python-telegram-bot in ./anaconda3/lib/python3.7/site-packages (11.1.0) Requirement already satisfied, skipping upgrade: certifi in ./anaconda3/lib/python3.7/site-packages (from python-telegram-bot) (2019.6.16) Requirement already satisfied, skipping upgrade: future>=0.16.0 in ./anaconda3/lib/python3.7/site-packages (from python-telegram-bot) (0.17.1) Requirement already satisfied, skipping upgrade: cryptography in ./anaconda3/lib/python3.7/site-packages (from python-telegram-bot) (2.4.2) Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.7 in ./anaconda3/lib/python3.7/site-packages (from cryptography->python-telegram-bot) (1.11.5) Requirement already satisfied, skipping upgrade: six>=1.4.1 in ./anaconda3/lib/python3.7/site-packages (

change password with ansible

ansible을 이용하여 agent 서버의 유저 패스워드 변경 1. 환경준비     Centos 7.x     Ansible  2. env ansible [root@localhost ~]# vi /etc/ansible/hosts # This is the default ansible 'hosts' file. # # It should live in /etc/ansible/hosts # #   - Comments begin with the '#' character #   - Blank lines are ignored #   - Groups of hosts are delimited by [header] elements #   - You can enter hostnames or ip addresses #   - A hostname/ip can be a member of multiple groups [testgroup] #192.168.0.156 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxxx 192.168.0.194 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxxx # edit playbook [root@localhost ~]# vi changepw.yml - hosts: testgroup   tasks:   - name: Test echo     shell:       whoami       echo -e 'oldpassword1\nlinuxpassword2\nlinuxpassword2' | passwd      register: cat   - debug: var=cat.stdout_lines      3. excute ansible [root@localhost ~]# ansible-playbook chan

ansible execute playbook

ansible을 이용한 playbook 실행  1. 환경준비     Centos 7.x 2. edit playbook [root@localhost ~]# vi /etc/ansible/hosts [testgroup] 192.168.0.156 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' 192.168.0.116 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' 192.168.0.177 ansible_connection=ssh ansible_ssh_user=min ansible_ssh_pass=xxxxxx ansible_ssh_common_args='-o StrictHostKeyChecking=no' [root@localhost ~]# vi test.yml - hosts: testgroup   tasks:     - script: /usr/bin/date >> /tmp/date.log ~ ~ [root@localhost ~]# ansible-playbook test.yml PLAY [testgroup] ****************************************************************************************************************************** TASK [Gathering Facts] *************************************************************************************