Python/Basic (27) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [Python] ๋ฐฐ์ด(๋ฆฌ์คํธ) ๋ง์ง๋ง ์์ ์ฐพ๊ธฐ -1 ์ธ๋ฑ์ค ์ด์ฉ [Python] List - List ๋นผ๊ธฐ a = [1,2,3] b = [1,2] [x for x in a if x not in b] [3] https://zetawiki.com/wiki/Python_%EB%A6%AC%EC%8A%A4%ED%8A%B8_%ED%95%A9%EC%A7%91%ED%95%A9,_%EA%B5%90%EC%A7%91%ED%95%A9,_%EC%B0%A8%EC%A7%91%ED%95%A9,_%EB%8C%80%EC%B9%AD%EC%B0%A8 Python ๋ฆฌ์คํธ ํฉ์งํฉ, ๊ต์งํฉ, ์ฐจ์งํฉ, ๋์นญ์ฐจ - ์ ํ์ํค ๋ค์ ๋ฌธ์์ด ํฌํจ... zetawiki.com [Python] psycopg2 ์ค์น ์ค๋ฅ flask, postgresql ์ฐ๋ ํ๊ธฐ ์ํด์ psycopg2๋ฅผ ์ค์น ํ๋ ค๊ณ ํ๋ค. $ pip3 install flask-sqlacodegen $ pip3 install psycopg2 ์ค๋ฅ ๋ฐ์ ใ ใ * libpq-dev ํจํค์ง ์ค์น ํ์ zoomadmin.com/HowToInstall/UbuntuPackage/libpq-dev How to install libpq-dev ubuntu package on Ubuntu 18.04/Ubuntu 19.04/Ubuntu 16.04 How To Install "libpq-dev" Package on Ubuntu Quick Install Instructions of libpq-dev on Ubuntu Server. It’s Super Easy! simply c.. [Python] ๋ ๋ฌธ์์ด ์ผ์น์จ ๊ณ์ฐ from difflib import SequenceMatcher a_str = 'abcd' b_str = 'bcd' SequenceMatcher(None, a_str, b_str).ratio() 0.8571428571428571 match_rate = f'{SequenceMatcher(None, a_str, b_str).ratio()*100:.1f}%' match_rate '85.7%' https://hoze.tistory.com/1741 ๋ ๋ฌธ์์ด์ ๋น๊ตํ์ฌ ์ผ์น์จ ๊ตฌํ๊ธฐ ํ๋์ค์ด ๋ฒ์ญ๋ณธ์ ์๋น ๋ถ๋ถ์ด ๊ตฌ๊ธ์ ๋ฒ์ญ๊ณผ ๊ณ ์ค๋ํ ์ผ์นํ๋ค. ๋ฒ์ญ์ฌ๊ฐ ์ ๋๋ก ์ผํ ๊ฒ์ผ๊น ์๊ตฌ์ฌ์ด ๋ค ๋งํ๋ค. ๋ค๋ฅธ ๋ฒ์ญ์ฌ์๊ฒ ๊ต์ด์ ๋งก๊ฒผ๋๋ฐ ๋ณ ๋ฌธ์ ๊ฐ ์๋ค๋ ๋ต๋ณ์ด ๋์์๋ค๊ณ hoze.tistory.com https://cod.. [Python] ์์ธ ๋ฐ์ ์ํค๊ธฐ, ๋ฉ์ธ์ง ์ถ๋ ฅ try: a = 1/0 except: raise Exception('์ค๋ฅ ๋ฐ์') [Python] cx_Oracle ํ๊ธ ๊นจ์ง import cx_Oracle import os os.environ['NLS_LANG'] = '.UTF8' os.environ['NLS_LANG'] = '.UTF8' ์ถ๊ฐ [Oauth] Google, email ์ ๋ณด ์ป๊ธฐ serviceName='oauth2', version='v2' ์๋น์ค๋ช , ๋ฒ์ ๋ญ๋ก ํด์ผํ ์ง ๋ชฐ๋ผ์ email ์ ๋ณด ์ป๊ธฐ ํ์ฐธ ํค๋งด ใ ใ ์๋น์ค๋ช ์ ๋ณด ์๋ ๊ณณ ์์๋ ๋ถ ์๋ ค์ฃผ์ธ์ง! import googleapiclient.discovery def get_user_info(credentials): """Send a request to the UserInfo API to retrieve the user's information. Args: credentials: oauth2client.client.OAuth2Credentials instance to authorize the request. Returns: User information as a dict. """ user_info_service = go.. [Python] python-docx - word ์ฝ๊ธฐ/ํธ์ง ํ๊ธฐ Demo.docx ํ์ผ์ ์ด์ด์ ํธ์งํด๋ณด๊ธฐ from docx import Document from docx.enum.table import WD_ALIGN_VERTICAL from docx.enum.text import WD_ALIGN_PARAGRAPH document = Document('Demo.docx') # ๋ฌธ์๋ด์ ํ ์ด๋ธ๋ค tables = document.tables # 1๋ฒ์งธ ํ ์ด๋ธ 0, 0 ์ - 2๋ฒ์งธ paragraphs์ ์ ๋ ฅ tables[0].cell(0, 0).paragraphs[1].text = 'paragraphs[1]' # 2๋ฒ์งธ ํ ์ด๋ธ 0, 0 ์ ์ ์ ๋ ฅ tables[1].cell(0, 0).text = 'table[1] (0,0)' out_file = 'New.docx' do.. ์ด์ 1 2 3 4 ๋ค์ ํฐ์คํ ๋ฆฌํด๋ฐ Developer๐ค๊ตฌ๋ ํ๊ธฐ