Computer/Programing (19) 썸네일형 리스트형 Windows cd-key finder by VBS 1. copy and paste following codes into text editor, 2. save it with extionsion '.vbs' 3. run the vbs file, 4. you will see windows cd-key in popup Set WshShell = CreateObject("WScript.Shell") winkey = ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) CreateObject("WScript.Shell").Run _ "mshta.exe javascript:eval(""document.parentWindow.clipboard.. MiTemp2 Read and write to SQL This post is for reading MiTemperature2 data via bluetooth and writing the data into SQL. Download reading temp. source from Github https://github.com/JsBergbau/MiTemperature2 Modify LYWSD03MMC.py file as below. parser=argparse.ArgumentParser(allow_abbrev=False) parser.add_argument("--device","-d", help="Set the device MAC-Address in format AA:BB:CC:DD:EE:FF",default='AA:BB:CC:DD:EE:FF',metavar=.. VS CODE VISUAL STUDIO CODE = VS CODE SSH Extension installation Extensions Install Remote-SSH the, you can see >< symbol once again and.. Send image file to Telegram import requests url = "https://api.telegram.org//sendPhoto";files = {'photo': open('cctv.jpg', 'rb')}data = {'chat_id' : "CHAT_ID"}r= requests.post(url, files=files, data=data)print(r.status_code, r.reason, r.content) def sendImage(): url = "https://api.telegram.org/bot/sendPhoto"; files = {'photo': open('/path/to/img.jpg', 'rb')} data = {'chat_id' : "YOUR_CHAT_ID"} r= requests.post(url, files=f.. Clien login python 클리앙 로그인 파이썬 #참조 https://beomi.github.io/2017/01/20/HowToMakeWebCrawler-With-Login/ # -*- coding: UTF-8 -*- import requestsfrom bs4 import BeautifulSoup as bs LOGIN_INFO = { 'userId': 'IDisHERE', 'userPassword': 'PASSWORDisHERE'} with requests.Session() as s: first_page = s.get('https://www.clien.net/service') html = first_page.text soup = bs(html, 'html.parser') csrf = soup.find('input', {'name': '_csrf'}) .. Python data structure 파이썬 자료구조 자료구조는 리스트list, 튜플tuple, 사전dict, 집합set 이 있다 추가list.append('a') list.update({'a':123})list.update({'a':'abc'})list.update({123,'abc'})update 이중 실행시 마지막 업데이트값 참조 삭제del list[0] 구조 확인print type(a) Python load json from web import jsonimport urllib2 url = "https://TARGET.URL"data = json.load(urllib2.urlopen(url)) import requestsimport bs4import json ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HOW TO USEimport fxratefxrate.usd()---------------------------.. Telegram URL 이용하여 문자 보내는법 Bot 을 이용하여 공개채널로 문자 전송 공개채널 https://api.telegram.org/bot봇ID입력/sendMessage?chat_id=@공개채널ID&text=내용입력 비공개채널 https://api.telegram.org/bot봇ID입력/sendMessage?chat_id=채널ID&text=내용입력 - 공개채널과 비공개 채널의 차이는 @ 포함여부임 - 공개채널에서 봇으로 Post시에 그 채널에 해당되는 Bot 이 들어가 있어야함, 초대방법은, 채널위 그룹명을 클릭해서 들어간 다음에 Administrators 클릭 후에 Add administrator 사용하여 Bot을 초대. 채널ID 확인법 1. 채널생성해서 bot 초대 2. 웹으로 아래 주소로 접속 https://api.telegram.or.. 이전 1 2 3 다음