본문 바로가기

Dev metacog24

word cloud 개발일지 ㅇ 핵심 기능 : 데이터 읽기, 데이터 클렌징(replace함수), WordCloud(wordcloud 패키지), masked word cloud # 파일 쓰기 # # f = open("test.txt", "w", encoding="utf-8") # f.write("안녕, 스파르타!\n") # for i in [1,2,3,4,5]: # f.write(f'{i} 번째 좋아요\n') # # f.close() # 파일 읽기 # with open("test.txt", "r", encoding="utf-8") as f: # lines = f.readlines() # for line in lines: # print(line) # # # 파일 읽기 # text = '' # with open("test.txt", "r.. 2021. 9. 16.
web crawl 개발일지 ㅇ 핵심 기능 : openpyxl, append, 웹브라우저의 검사 기능과 엘리먼트 파악 - thumbnail = article.select_one('a > img')['src'] from bs4 import BeautifulSoup from selenium import webdriver driver = webdriver.Chrome('chromedriver') from openpyxl import Workbook wb = Workbook() ws1 = wb.active ws1.title = "articles" ws1.append(["제목", "링크", "신문사", "썸네일"]) url = "https://search.naver.com/search.naver?&where=news&query=추석" dri.. 2021. 9. 15.
img crawl 개발일지 개발 흐름 - 필요한 패키지 import : dload(그림저장), BeautifulSoup(웹읽기), webdriver(브라우저기동), time(sleep동작) 핵심 스킬 - 브라우저의 '검사' 기능 이용 copy>selector 사용 반복부 찾기 : thumnails = soup.select('#imgList > div > a > img') - 저장할 폴더를 포맷팅 기능으로 적용 : dload.save(img, f'imgs_homework/{i}.jpg') - 구글 webdriver : https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/ import dload from bs4 import BeautifulSoup from.. 2021. 9. 14.
git config 로 github에 다시 업로드 문제) 컴퓨터를 새로 포맷을 한 후에 git업로드에 실패 해결) 1) git config를 새롭게 수행 아래의 명령어를 이용해서 전역 사용자명/이메일 구성하기 git config - -global user.name “Your name” git config - -global user.email “Your email address 2) vscode에서 ㅇ commit 한 후에 ㅇ sync 3) github에서 확인 2021. 4. 19.
SW 패키지 배포 전략 Rolling Update 단위별 서버 1대씩 단위별로 배포 Blue/Green(Red/Black) Deployment 한번에 전체 트래픽을 한 번에 신규 서버로 배포 - 롤백이 신속 - 시스템 자원이 2배 소요 - 트래픽 이전 시 서비스 중단 시간 발생 Canary Release 점진적 트래픽 일부를 신규 서버로 이전하여 상태를 보고 점진적으로 배포 - 특정 유저군 배포를 통해 위험 감지 가능(A/B test가능) 2021. 4. 14.
vscode로 python 코딩 시작하기 처음 사용자가 빠르게 시작하기 위한 핵심 설정 포인트입니다. python download python 설치 vscode 기동 www.python.org 에서 다운로드 - 64bit, 32bit 선택 가능 1) custom설치 : 설치 dir 결정 2) path 포함 3) 고급시스템설정>시스템변수>path - 새로 만들기 후에 최상단으로 이동 1) folder 생성 - File>Open Folder 에서 작업 폴더 생성 2) 버전 확정 - 좌측 하단의 버전명을 클릭해서 설치 버전에서 선택 변경가능 2021. 4. 11.