Python/Open Source

Python/Open Source

[Python] 파이썬 출력 문자 색 변경하기

[Python] 파이썬 출력 문자 색 변경하기 (Python print with color) 파이썬 문자 혹은 데이터 출력시에 색깔과 함께 이미지처럼 출력하는 방법 GitHub 주소 https://github.com/sanggi-wjg/color_print Install pip install colorful_print Usage 1 import sys from colorful_print import color a = [1, 'a', 2.3] b = (4, 'b', 5.6) color.black('Print Black', a, b) color.red('Print Red', a, b) color.green('Print Green', a, b) color.yellow('Print Yellow', a, b) c..

Python/Open Source

[Locust] 2. Locust를 통한 언어와 프레임워크 별 테스트

테스트용 Locust 설정 locust.conf locustfile = locust_impl.py headless = true expect-workers = 5 host = http://localhost:8000 users = 10 spawn-rate = 10 run-time = 30s locust_impl.py from locust import task, FastHttpUser class TargetURL: ROOT = "/" STRING = "/string" JSON = "/json" CALC = "/calc" class LocustImpl(FastHttpUser): @task def root(self): self.client.get(TargetURL.ROOT) @task def string(self..

Python/Open Source

[Locust] 1. Locust 부하 테스트 툴(load testing tool)

Locust란? https://locust.io/ https://docs.locust.io/en/stable/ Locust는 오픈 소스로 제공하는 부하 테스트 툴 프레임워크. 매우 간단한 소스코드를 통해 기능을 수행할 수 있고 제공해주는 설정들을 통해서 유저 수량 지정 테스트 등 다양한 테스트를 진행 할 수 있음. 간단한 개발과 설정으로 빠르게 테스트를 할 수 있는 환경을 갖출 수 있음. 설치 pip install locust 실행 locust.conf locustfile = locust_impl.py expect-workers = 5 host = http://localhost:8000 users = 10 spawn-rate = 10 run-time = 1m locust_impl.py from locus..

Python/Open Source

ChatGPT를 이용한 간단한 Web App 만들기 (python, streamlit)

Python Streamlit을 통해서 간단한 ChatGPT Web App 만들어보기 우선, Streamlit 이란? https://docs.streamlit.io/ streamlit는 주로 데이터 사이언스, 머신 러닝 등에서 사용되는 커스터 마이징 가능한 간단하고 쉽게 웹앱을 만들어주는 오픈 소스이다. 사용할 ChatGPT SDK, Reverse Engineered ChatGPT API revChatGPT repo는 abandod or deprecated 되었습니다. python OpenAI sdk 사용을 권장 합니다. https://github.com/acheong08/ChatGPT Python 패키지 설치 pip install revChatGPT pip install streamlit chatgpt..

Python/Open Source

[Python] Colorful print

Example from colorful_print import color color.black('Print Black') color.red('Print Red') color.green('Print Green') color.yellow('Print Yellow') color.blue('Print Blue') color.magenta('Print Magenta') color.cyan('Print Cyan') color.white('Print White') print() color.red('Print Red') color.green('Print Bold Green', bold = True) color.yellow('Print Bold Italic Yellow', bold = True, italic = True..

Python/Open Source

[Python 오픈소스] Diagrams

Diagrams 라는 Python Github 오픈소스 라이브러리 이며, 이 라이브러리는 소스 작성을 통해서 그림을 그려주는 것을 정말로 간단하게 해준다. Github 주소 : github.com/mingrammer/diagrams mingrammer/diagrams :art: Diagram as Code for prototyping cloud system architectures - mingrammer/diagrams github.com Docs 주소 : diagrams.mingrammer.com/docs/guides/diagram Diagrams · Diagram as Code Diagram as Code diagrams.mingrammer.com 이하 샘플로 작성한 코드. from diagrams ..

상쾌한기분
'Python/Open Source' 카테고리의 글 목록