마우스 중앙버튼 Alt + f4
크롬 및 익스플로러 backward forward 를 Ctrl+- // Ctrl+0 으로(Vs와 같게)
마우스 앞뒤버튼 VS와 같게 매크로
2017년 1월 22일 일요일
2017년 1월 12일 목요일
[python] numpy axis
axis는 n차원시 n번째 있는게 axis-n 이 된다. 즉
[
[1 ,1 ,1],
[10 ,20 ,30],
]
axis 1은
[
func([1,1,1] ),
func([10,20,30)
]
이 된다.
axis 0은
[
func([1,10] ),
func([2,20] ),
func([3,30] ),
]
이 된다.
axis0이라 함은 , axis1이 없다고 생각해
[
1,
10
]
만 있다고 생각하고 한다. 이런게 총 3개 있는것이다.
[
1,
10
]
[
[1 ,1 ,1],
[10 ,20 ,30],
]
axis 1은
[
func([1,1,1] ),
func([10,20,30)
]
이 된다.
axis 0은
[
func([1,10] ),
func([2,20] ),
func([3,30] ),
]
이 된다.
axis0이라 함은 , axis1이 없다고 생각해
[
1,
10
]
만 있다고 생각하고 한다. 이런게 총 3개 있는것이다.
[
1,
10
]
[
2,
20
]
2,
20
]
[
3,
30
]
2차원 이상은 다음을 돌려보자
a = [[
[1 ,1 ,1],
[10 ,20 ,30],
],
[
[1 ,1 ,1],
[10 ,20 ,30],
],
]
temp = [np.var(a,0)]
temp = np.asarray(temp)
print temp
3,
30
]
2차원 이상은 다음을 돌려보자
a = [[
[1 ,1 ,1],
[10 ,20 ,30],
],
[
[1 ,1 ,1],
[10 ,20 ,30],
],
]
temp = [np.var(a,0)]
temp = np.asarray(temp)
print temp
2017년 1월 11일 수요일
[EmguCV] Image Load with Gpu
Mat graymat = new Mat(ofd.FileName,LoadImageType.Grayscale);
Mat colormat = new Mat(ofd.FileName,LoadImageType.Color);
Core.OriginImg = graymat.ToImage(false);
Core.ColorOriImg = colormat.ToImage( false );
Mat colormat = new Mat(ofd.FileName,LoadImageType.Color);
Core.OriginImg = graymat.ToImage
Core.ColorOriImg = colormat.ToImage
처음에는 Mat으로 불러온 다음에 Image에 세팅해야 오류가 안난다.
지포스 1060,650 Gpu에서만 테스트 완료.
2016년 12월 25일 일요일
[C#] collection, Array
IEnumerable : 최소한의 기능성 (열거) 만 제공. Movenext로 값 찾는다. 인덱스로 못찾음.
ICollection : 중간정도 기능성 . 카운트같은것.
IList / IDictionary : 최대의 기능성 . 색인 키에 의한 임의접근도 가능
IEnumerable - Movenext, foreach의 기능이 있다 .
ICollection - IEnumerable과 같이 foreach로 항목을 훑는기능에 count, Contain, ToArray 기능 + 쓰기 가능한것에는 Add,Remove,clear 기능이 있다.
IList - 특정 위치의 요소에 접근하는 기능이 있다.
** ArrayList 는 List 보다 느리다. (T가 값형식 일때)
// Array //
Array 는 크기는 변경이 안된다. 하지만 색인으로 특정 요소에 접근하는 속도는 매우 빠르다.
참조 형식이라 딥카피를 해야한다. (Array1 = Array2.Clone() 이건 shallow copy다 )
열거 - Array.ForEach(new[] {1,2,3} , console.WriteLine);
BitArray - bool 값만 저장하므로, 메모리사용이 적다. 0
** ArrayList 는 List
// Array //
Array 는 크기는 변경이 안된다. 하지만 색인으로 특정 요소에 접근하는 속도는 매우 빠르다.
참조 형식이라 딥카피를 해야한다. (Array1 = Array2.Clone() 이건 shallow copy다 )
열거 - Array.ForEach(new[] {1,2,3} , console.WriteLine);
2016년 12월 22일 목요일
[python] matplotlib setting
backend 를 다음에서 정할 수 있다 . 경로는
C:\Anaconda2\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
# CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
# Template.
# You can also deploy your own backend outside of matplotlib by
# referring to the module name (which must be in the PYTHONPATH) as
# 'module://my_backend'.
backend : WXAgg <
# If you are using the Qt4Agg backend, you can choose here
# to use the PyQt4 bindings or the newer PySide bindings to
# the underlying Qt4 toolkit.
backend.qt4 : PyQt4 <
C:\Anaconda2\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
# CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
# Template.
# You can also deploy your own backend outside of matplotlib by
# referring to the module name (which must be in the PYTHONPATH) as
# 'module://my_backend'.
backend : WXAgg <
# If you are using the Qt4Agg backend, you can choose here
# to use the PyQt4 bindings or the newer PySide bindings to
# the underlying Qt4 toolkit.
backend.qt4 : PyQt4 <
2016년 12월 19일 월요일
[python] Theano Givens
from theano import function
from theano import tensor as T
from theano import shared
state = shared(0)
inc = T.iscalar()
accumulator = function([inc],state,updates=[(state,state+inc)])
decrementor = function([inc],state,updates=[(state,state-inc)])
fn_of_state = state*2+inc
foo = T.scalar(dtype=state.dtype)
skip_shared = function([inc,foo],fn_of_state,givens=[(state,foo)])
print state.get_value()
print skip_shared(1,3)
----------------------------------------------------------------------
givens=[(state,foo)]은 state를 foo로 대체해준다.
따라서, inc =1 , foo= 3 이였고, given으로 state를 foo즉 3으로 바꿔서 fn_of_state가 계산된다.
그리고 원래의 state는 바뀌지 안는다.
이 givens는 shared valuable뿐만 아니라, 모든 심볼릭 변수들을 대체할 수 있다.
from theano import tensor as T
from theano import shared
state = shared(0)
inc = T.iscalar()
accumulator = function([inc],state,updates=[(state,state+inc)])
decrementor = function([inc],state,updates=[(state,state-inc)])
fn_of_state = state*2+inc
foo = T.scalar(dtype=state.dtype)
skip_shared = function([inc,foo],fn_of_state,givens=[(state,foo)])
print state.get_value()
print skip_shared(1,3)
----------------------------------------------------------------------
givens=[(state,foo)]은 state를 foo로 대체해준다.
따라서, inc =1 , foo= 3 이였고, given으로 state를 foo즉 3으로 바꿔서 fn_of_state가 계산된다.
그리고 원래의 state는 바뀌지 안는다.
이 givens는 shared valuable뿐만 아니라, 모든 심볼릭 변수들을 대체할 수 있다.
피드 구독하기:
글 (Atom)