본문 바로가기 메뉴 바로가기

파이몬

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

파이몬

검색하기 폼
  • Pymon (15)
    • Programming (14)
      • Android (0)
      • Python (4)
      • Ubuntu (8)
      • Web (1)
      • Django (1)
    • 언어공부 (1)
      • 영어 (1)
  • 방명록

python (3)
python queue를 이용한 multiprocessing 기초

python queue를 이용한 multiprocessing 기초 뼈대 import multiprocessing #동작 실행 함수 def do_work(item): print item #Queue 전달 함수 def worker(q): for item in iter(q.get, None): do_work(item) q.task_done() q.task_done() #메인 함수 def main(): #동작 프로세스 개수 num_procs = 5 #큐 데이터 items = [1,2,3,4,5,6,7,8,9,10] q = multiprocessing.JoinableQueue() procs = [] for i in range(num_procs): procs.append(multiprocessing.Process(..

Programming/Python 2017. 12. 19. 17:57
1. Django 시작하기

개발 환경 : Ubuntu 16.04.2 LTS, python3, postgresql 9.5 1. 가상 환경 세팅sudo apt-get install python-virtualenvvirtualenv --python=python3 myvenvsource myvenv/bin/activate 2. django 설치pip install django 3. django 시작django-admin startproject mysite . 4. 데이터베이스 설정mysite/settings.py- sqlite3 사용 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } ..

Programming/Django 2017. 5. 15. 16:15
python terminal color print

1. pip install termcolor 2. source from termcolor import colored, cprint print colored("ABCDEFG", "red") print colored("ABCDEFG", "green") print colored("ABCDEFG", "yellow") print colored("ABCDEFG", "blue") print colored("ABCDEFG", "grey") print colored("ABCDEFG", "magenta") print colored("ABCDEFG", "cyan") print colored("ABCDEFG", "white") cprint('Hello, World!', 'white', 'on_red') cprint('Hell..

Programming/Python 2017. 4. 4. 11:32
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • 뉴스기사번역
  • python
  • python3 환율
  • python3
  • 파이썬 파싱
  • tar 압축
  • 도커 사용법
  • python3 파싱
  • docker 설치
  • termcolor
  • 우분투
  • 우분트 프로세스 백그라운드
  • python color print
  • 파이썬 병렬
  • python thread
  • python3 환율 api
  • 파이썬3 크롤러
  • multiprocess
  • 우분투 tar
  • 파이썬 웹파싱
  • multiprocessing
  • docker 사용법
  • 파이썬 user-agent
  • 도커 설치
  • 파이썬
  • python web framework
  • python multiprocess
  • apt-get error
  • terminal print color
  • python queue
more
«   2025/12   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바