Skip to content

Instantly share code, notes, and snippets.

View RavenKyu's full-sized avatar

Raven RavenKyu

View GitHub Profile
@RavenKyu
RavenKyu / multiproc_1.py
Created May 9, 2019 10:34
멀티프로세스 사용시 각 프로세스별 다른 파이썬 가상환경 지정 예제
# 본 예제는 v_1, v_2, v_3 이라는 파이썬 가상환경이 미리 생성되어 있어야 한다.
# 각 가상환경에는 다른 버전의 PyYAML 이 설치 되어 있어야 한다.
import multiprocessing as mp
import os, sys
import pathlib
from functools import wraps
@RavenKyu
RavenKyu / with_error.py
Created November 12, 2018 02:49
with error?
class TestClass(object):
def a(self):
raise TypeError
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
print(exc_type, exc_val, exc_tb)
return True
@RavenKyu
RavenKyu / QGraphicsScene_00_draw_grid.py
Created November 9, 2018 06:29
그리드위 좌표 찍기 및 출력
import sys
from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5.QtWidgets import QMenu
from PyQt5.QtCore import QEvent
from PyQt5.QtGui import QKeySequence
from PyQt5.QtGui import QPen, QColor
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QCursor
@RavenKyu
RavenKyu / ship.py
Created October 8, 2015 10:45
ship
# coding: utf-8
import sys
from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5 import QtGui
import time
import random
import math
@RavenKyu
RavenKyu / ping_pong.py
Created October 1, 2015 12:36
핑퐁1
__author__ = 'raven'
import sys
from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5 import QtGui
import random
class Bar:
def __init__(self, x, y):
@RavenKyu
RavenKyu / QClipboard.py
Created June 3, 2015 08:50
Example: QClipboard
# coding: utf-8
import sys
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from PyQt5.QtCore import pyqtSlot # pyqtSlot 프로퍼티를 사용하기 위함
datas = ['정철아','문서를','보면','다 나온다']