전체 글 274

python slacker

1. python slack API - 준비 1. bot 만들고 token 얻기 https://api.slack.com/apps 위의 주소로 접속 Create New App 클릭 App Name 입력 -> Development Slack Workspace 선택 -> Create App 클릭 Your Apps 클릭 -> 방금 생성한 bot 클릭 Verification Token 복사 2. slacker 설치 pip install slacker 2. python slack API - 실제로 사용해보기 1. 공통 부분 작성 from slacker import Slacker token = "Verification Token" slack = Slacker(token) 2. 채널 리스트 얻어오기 channel_li..

chrome driver, chrome, centos7

chrome 설치 yum 저장소 만들기 sudo vi /etc/yum.repos.d/google-chrome.repo [google-chrome] name=google-chrome baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub chrome 설치 sudo yum install google-chrome-stable chrome 버전 확인 google-chrome --version [noel@noel_server]# google-chrome --version Google Chrome 83.0.4103..

pymysql

pymysql mysql timestamp select import datetime timestamp = datetime.datetime(2020, 1, 1) q = "SELECT * FROM test_table WHERE created_timestamp < %s" cursor.execute(q, (timestamp))column type 이 timestamp 라면 string으로 selct 하지 말것 timestamp = &#39;2020-01-01&#39; 오류는 발생하지 않지만 select는 불가능합니다. 꼭 datetime으로 변환해서 넣어줘야 합니다 pymysql timestamp 일부만 update 날짜는 그대로 두고 년도와 월만 update today = "2020-01" q = "UPDAT..

Python 2020.06.01