Skip to content

Instantly share code, notes, and snippets.

@jayu108
jayu108 / keyevents.py
Last active December 21, 2015 01:29
wxpython 2.9 key events demo
# -*- coding: euc-kr -*-
import wx
import wx.lib.mixins.listctrl as listmix
import time
#----------------------------------------------------------------------
keyMap = {
import wx, wx.grid as grd
class MyGrid(grd.Grid):
def __init__(self, parent):
grd.Grid.__init__(self, parent, -1, pos=(10,40), size=(420,95))
self.CreateGrid(3,3)
self.RowLabelSize = 0
self.ColLabelSize = 20
@jayu108
jayu108 / screencapture.py
Last active December 21, 2015 05:19
화면 캡쳐 & 저장하기..** dc.GetAsBitmap() 는 사용못함 !!!!
# -*- coding: utf-8 -*-
import wx
import time
class Example(wx.Frame):
def __init__(self, parent, title):
super(Example, self).__init__(parent, title=title, size=(250, 150))
self.bmp = None
self.timeOn = True # 캡쳐사진에 시간표시.
@jayu108
jayu108 / myprint.py
Last active August 29, 2015 13:56
print
class MyPrintout(wx.Printout):
def __init__(self,page_bitmap):
wx.Printout.__init__(self)
self.page_bitmap = page_bitmap # 인쇄할것을 bitmap으로 넘겨받는다.
self.margins = (wx.Point(15,15), wx.Point(15,15)) # 여백 15mm
self.numPages = 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jayu108
jayu108 / ML_chap10.ipynb
Created March 7, 2015 15:12
build machine learning for python - chapter 10.computer vision and pattern recognition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jayu108
jayu108 / combobox.py
Last active August 29, 2015 14:21
wxpython ; wx.ComboBox -- item 추가하기
# -*- coding: utf-8 -*-
import wx
class MyFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
panel = wx.Panel(self)
@jayu108
jayu108 / cv_test1.cpp
Created May 22, 2015 06:32
opencv 2.4.11 -- image 불러온후 화면출력하기.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
int main()
{
cv::Mat image; // create an empty image
image = cv::imread("D:\\opencv\\build\\doc\\opencv-logo.png"); // read an input image
// define the window (optional)
@jayu108
jayu108 / matplotlib_line.py
Created May 22, 2015 06:40
matplotlib -- 선형방정식 x축, y축 그리기
import numpy as np
import matplotlib.pyplot as plt
plt.axvline(x=0, color = 'r') # draw x =0 axes
plt.axhline(y=0, color = 'r') # draw y =0 axes
x = np.arange(-10,10)
y = 2*x + 3
@jayu108
jayu108 / qt_test1.cpp
Created May 22, 2015 07:35
Qt 5.4 test code
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();