본문 바로가기

전체 글258

코루틴과 태스크, 퓨처 - 파이썬 레퍼런스 정리 https://docs.python.org/ko/3/library/asyncio-task.html 코루틴과 태스크 — Python 3.10.6 문서 코루틴과 태스크 이 절에서는 코루틴과 태스크로 작업하기 위한 고급 asyncio API에 관해 설명합니다. Coroutines declared with the async/await syntax is the preferred way of writing asyncio applications. For example, the follo docs.python.org https://wonhyeok1994.tistory.com/79 asyncIO_1_( 코루틴개념+함수 : create_task, run, sleep ) 참고 https://docs.python.org/ko.. 2022. 8. 17.
functools.partial() 정리 https://wikidocs.net/109304 031 기존 함수로 새로운 함수를 만들려면? ― functools.partial functools.partial()은 하나 이상의 인수가 이미 채워진 새 버전의 함수를 만들 때 사용하는 함수이다. ## 문제 다음은 입력한 인수의 합과 곱을 choic ... wikidocs.net 한 함수에 parameter 를 고정하고 재정의해서 쓰는 lib 전부 고정할 수 도 있고, 하나만 고정 할 수도 있다. 예시_1 : def add_mul(choice, *args): if choice == "add": result = 0 for i in args: result = result + i elif choice == "mul": result = 1 for i in arg.. 2022. 8. 17.
client-agent-manager 구조 믿지말것 혼자 보는용이라 틀린내용 다수 있을 수 있습니다아 1. C - A - M - S 구조 2. Simple C - S 구조 3. 1,2 를 합친 구조 // C - S - SA -> CM 여기서 나오는 개념은 1.Client, 2.Agent, 3.manager 그리고 4.Client, 5.Server, 6.ServerAgent 정도임 그럼 중간에 낀 5.Server 때문에 형식이 달라보이지만 사실 그렇지 않음 동일함. 4.Client, 5.Server, 6.ServerAgent 구조의 4.Client는 엄청 다수의 Client가 있는 경우인데 다수의 4.Client마다 agent를 두면 비효율 적이기 때문에 중간에서 data를 정리해주는(교통정리) 5.Server가 있는 거임. 따라서 Client도 .. 2022. 8. 5.
PIL , 출력문 저장 lib(write,print,sys.out) 참조 개념이나 모드 설명 https://pillow.readthedocs.io/en/stable/handbook/concepts.html#concept-modes Concepts The Python Imaging Library handles raster images; that is, rectangles of pixel data. Bands: An image can consist of one or more bands of data. The Python Imaging Library allows you to store several... pillow.readthedocs.io 사용법 예시 https://pillow.readthedocs.io/en/stable/reference/Image.html Image M.. 2022. 8. 4.
깃랩 자주 쓰는 명령어 모음 fatal: unable to access 'https://xxxxxxxxx.git/': Could not resolve host: source.xxxxxx.co.kr 에러시 : git config --global --unset http.proxy git config --global --unset https.proxy 이거로 안되면 git config --global user.name "user name" git config --global user.email "user email" 해도 안되면 ---------------------------------------------- ping github.com 핑테스트 해보고 안되면 /etc/resolv.conf master 브랜치로 머지 git checko.. 2022. 8. 4.
프로세스 이름으로 죽이기 // killall -s KILL {name} ps 해서 kill -9 {PID} 랑 killall -s KILL {CMD} ex) kill -9 16532 killall -s KILL python 2022. 8. 3.