2D 컴퓨터비젼에 대한 설명. 영상으로부터 정보를 추출해내는 공학/과학 분과인 컴퓨터비젼의 기술에 대한 쉬운 설명. 파이썬(Python)의 컴퓨터비젼/영상처리 라이브러리인 scikit-image를 주로 활용하였으며 코드를 함께 담음.
R컨퍼런스 발표본 (2014.5.30) 임.
The document discusses various Python data structures and modules for working with data structures efficiently. It covers the abc module for defining abstract base classes, the array module for efficient storage of homogeneous data, the bisect module for working with sorted lists, the collections module which provides high-performance container data types like deque and defaultdict, namedtuple for creating tuple subclasses with named fields, heapq for priority queue implementation, and itertools for functions generating efficient iterators.
The document discusses various Python data structures and modules for working with data structures efficiently. It covers the abc module for defining abstract base classes, the array module for efficient storage of homogeneous data, the bisect module for working with sorted lists, the collections module which provides high-performance container data types like deque and defaultdict, namedtuple for creating tuple subclasses with named fields, heapq for priority queue implementation, and itertools for functions generating efficient iterators.
"파이썬 성능 잠재력을 끌어내는 실용적인 개발 전략서"
미샤 고렐릭,이안 오스발트 지음 / 김영근,오현석 옮김 | 한빛미디어 | 2016년 8월 | 30,000원
★ 파이썬 3 대응
★ 프로토타이핑에서 실무 운영까지 살아가는 파이썬 코드의 비밀
아이디어 무한경쟁이 펼쳐지는 대(大)스타트업 시대! 높은 생산성으로 유명한 파이썬은 최우선 고려사항이다. 한 가지, 컴파일 언어 대비 느린 성능 때문에 성공한 서비스나 성능이 중요한 기능은 컴파일 언어로 다시 작성하곤 한다. 하지만 실무 운영까지 파이썬 코드를 계속 이어가는 방법이 있다면?
이 책은 파이썬을 둘러싼 설계와 작동 원리를 설명하고 이에 기반한 실용적인 구현 전략을 소개한다. 멀티코어 아키텍처와 클러스터의 이점을 활용하려면 어떻게 해야 하는가? 안정성을 잃지 않고 확장하는 방법은 무엇인가? 여러분은 이에 대한 명확한 해법을 찾고 방대한 소셜 데이터까지도 눈부신 속도로 처리해내는 파이썬 코드를 얻게 될 것이다.
★ 주요 내용
● numpy, Cython, 프로파일러 활용하기
● 파이썬의 시선으로 바라보는 컴퓨터 아키텍처 이해하기
● CPU 시간과 메모리 사용량을 프로파일링하여 병목 지점 찾기
● 상황에 맞는 컬렉션으로 효율적인 프로그램 작성하기
● 행렬과 벡터 연산 가속하기
● 네이티브 코드로 컴파일하기
● 대량의 I/O와 연산 동시 수행하기
● 원격 클러스터로 병렬 처리하기
● 적은 메모리로 대규모 데이터 처리하기
서비스 인프라를 만들때 고민되는 것들.
- 클라우드를 이용하면 모든 것이 해결될까?
- 사용자들이 겪는 어려움과 서비스 품질의 이슈는 무엇일까?
- 세계적으로 사랑받는 서비스들은 어떤 아키텍쳐를 가지고 있을까?
이런 고민들과 생각들을 몇 장의 슬라이드로 가볍게 풀어봅시다!
9xD Django Study
파이썬 웹프로그래밍 - Django로 배우는 쉽고 빠른 웹개발 Charter 2
발표자 - 김한성
ppt 내용 : 실습 예제 및 내용 요약
개발툴 : pycharm
개발환경 : python 3.5 이용(일부 예제의 경우 동작안함 - 주석 참고)
소스코드 : 2 page github 링크이용
위 자료는 BOAZ 2016 하반기 프로젝트 주제의 하나로, Advanced 정규세션 동안 Base 정규세션에서 배웠던 다양한 이론들과 기본 지식들, 그리고 툴 활용능력들을 직접 실행하며 진행한 결과물입니다.
*** 워드임베딩과 인공신경망을 이용한 개인 맞춤형 레시피 추천 ***
추천 시스템의 Cold start Problem에 대처하기 위해, 대량의 레시피 텍스트로부터 각 레시피의 특징을 추출하고 이를 인공신경망에 매핑하여 복잡미묘한 입맛의 선호를 예측, 봇 인터페이스를 통해 피드백을 받는 Online learning 형태의 추천 시스템을 제안함.
6기 김성동 숭실대학교 경영학부
6기 김수연 동덕여자대학교 정보통계학과
6기 노우영 한양대학교 ERICA 응용수학과
6기 박소영 건국대학교 응용통계학과
6기 박소현 연세대학교 응용통계학과
6기 이지원 고려대학교 통계학과
** 국내 최초 대학생 빅데이터 연합동아리 BOAZ **
Blog : http://BOAZbigdata.com
Facebook : http://fb.com/BOAZbigdata
Agile and Beyond 2016 Rethinking Agile TransformationJason Little
The document discusses rethinking agile transformations in organizations. It suggests that organizations often go about transformations incorrectly by "doing Agile" rather than "being Agile", which can lead to failures. It advocates modeling the change desired, telling stories, and provoking conversations to help transformations emerge and coalesce naturally from the bottom-up, rather than being imposed from the top-down through centralized control which can cause bureaucratization and the loss of early adopters. The key is focusing on the original purpose of the transformation rather than just adopting practices for their own sake.
When the Danaher Corporation announced in May 2015 that it would split into two separate enterprises in 2016, it seemed at first like a reversal of the company’s history. Danaher had built itself into a remarkably successful business over four decades by acquiring and integrating new companies into a unified whole, improving them through a group of distinctive management practices known as the Danaher Business System (DBS), then holding onto them. Although it’s sometimes compared to a private equity firm, Danaher is different — it buys and builds companies for the long term, not for rapid fix-up and sale. Divesting is not the Danaher modus operandi.
But from a strategic point of view, the split makes sense. Although these two new companies have a common heritage and management approach, their businesses are distinct enough from each other that they require different capabilities.
One new company, which will retain the Danaher name, will focus on science and technology businesses. Generally, these are enterprises with resilient business models, strong long-term growth, high gross margins, and significant business in aftermarket products, such as replacement parts and upgrades. The other company, Fortive Corporation, will be made up of what Danaher calls its “industrial growth” enterprises. These are industrial end-market businesses with slightly more cyclical markets, high operating margins, and strong cash flow. The split is intended to provide each company with its own focus and to increase capital deployment flexibility, thus providing more opportunities for growth in each company’s distinctive way.
Light Tutorial Python
Studybee 2주차 스터디, 가볍게 보는 파이썬!!!
가볍게 파이썬에 대해서 공부하는 시간입니다~
**http://www.studybee.kr 에서 운영하는 '초심자를 위한 웹개발' 클래스에서 만드는 교재이며,
장고를 이용해 간단하게 블로그를 만드는 것을 목표로 하고 있습니다.
The presentation slides for PyCon Korea 2019 session that is talking about Python Variable. It will compare the difference between immutable/mutable, class/instance, global/nonlocal/local variables.
본 강의에서는 함수와 매개변수에 대해 다루어 보겠습니다.
- 강의 키노트 자료는 다음 링크를 통해 다운 받으세요
https://drive.google.com/drive/folders/1UrrO4_ch4xcIErbExstwpUVY6vFvPdkW
- 강의 소스코드는 다음 링크를 통해 다운 받으세요
https://github.com/dongupak/Basic-Python-Programming
FPV Streaming server system built by Go with ffmpeg.
Receive analog video transmitted by drone, convert it to digital video and streaming to mobile devices.
Improving monitoring systems Interoperability with OpenMetricsChan Shik Lim
Introduction Prometheus with OpenMetrics for improving monitoring system interoperability.
- Introduction Prometheus
- Introduction OpenMetrics
- Demo: Prometheus and Datadog integration with OpenMetrics
This document discusses TimescaleDB, an open-source time-series database built on PostgreSQL. It provides an overview of TimescaleDB, including that it uses hypertables to store time-series data across partitions, allows for easy SQL queries, and scales both vertically and horizontally. The document then demonstrates how to install TimescaleDB, create a hypertable from an existing PostgreSQL table to store time-series data, insert sample data, and perform queries on the data. It concludes with references for more information.
Talk about Kubernetes cluster on baremetal servers for serve internal services.
Sharing my experiences about setup and manage kubernetes cluster on premise.
At first, start with single master kubernetes cluster and enhanced by many opensource softwares.
Add more master nodes for increase server availability.
Use Rook, MetalLB, Ceph, mysql-operator and more opensource projects.
15. 매개변수전달과 반환값
함수매개변수는단순히전달된입력객체를참조하는이름일뿐
변경 불가능한값: 값에의한전달
변경 가능한객체: 참조에의한전달
변경 가능한객체가 함수에전달되어그 값이변경되면원래객체값에영향
>>> a = [1, 2, 3, 4, 5]
>>> def square(items):
... for i, x in enumerate(items):
... items[i] = x * x
...
>>> square(a)
>>> a
[1, 4, 9, 16, 25]
15
39. 생성기와yield
>>> c = countdown(3)
>>> type(c)
<class 'generator'>
반환된생성기 객체를이용해실제함수실행
Python3 에서는__next__(), Python2 에서는next() 호출
>>> c.__next__()
Counting down from 3
3
>>> c.__next__()
2
>>> c.__next__()
1
>>> c.__next__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
StopIteration
39
40. 생성기와yield
생성기 실행순서
__next()__ 를호출하면생성기 함수는yield문까지실행
yield문은결과를생성해반환하고 __next()__ 호출전까지실행중단
함수실행은yield바로다음문장에서재개
보통은생성기를직접호출하기보다는순서열을소비하는for, sum() 혹은
기타연산에서__next()__ 호출이사용됨
>>> for n in countdown(3):
... print(n)
...
Counting down from 3
3
2
1
>>> sum(countdown(3))
Counting down from 3
6
40
41. 생성기와yield
생성기 함수를부분적으로만실행하는경우에는close() 메서드를호출해
명시적으로생성기 객체에종료를알려주는것이가능
>>> c = countdown(10)
>>> c.__next__()
Counting down from 10
10
>>> c.__next__()
9
>>> c.close()
>>> c.__next__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
StopIteration
41
42. 생성기와yield
생성기 함수안에서는yield문에서GeneratorExit 예외가 발생하는것으로
외부에서close() 함수호출한것을알수있음
>>> def countdown(n):
... print("Counting down from %d" % n)
... try:
... while n > 0:
... yield n
... n -= 1
... except GeneratorExit:
... print("Only made it to %d" % n)
...
>>> c = countdown(10)
>>> c.__next__()
Counting down from 10
10
>>> c.__next__()
9
>>> c.close()
Only made it to 9
42
43. 코루틴과 yield표현식
함수안에서yield문을대입연산자오른쪽에두고 값을받아오도록하는것이
가능
>>> def receiver():
... print("Ready to receive")
... while True:
... n = yield
... print("Got %s" % n)
...
위의코드처럼yield를사용하는함수를코루틴(coroutine) 이라고 함
함수외부에서보내준값에답하여실행
동작방식은생성기와매우유사
43
53. 생성기와코루틴사용
import os
import fnmatch
def find_files(topdir, pattern):
for path, dirname, filelist in os.walk(topdir):
for name in filelist:
if fnmatch.fnmatch(name, pattern):
yield os.path.join(path, name)
def opener(filenames):
for name in filenames:
f = open(name)
yield f
def cat(filelist):
for f in filelist:
for line in f:
yield line
def grep(pattern, lines):
for line in lines:
if pattern in line:
yield line
53
56. 생성기와코루틴사용
@coroutine
def find_files(target):
while True:
topdir, pattern = yield
for path, dirname, filelist in os.walk(topdir):
for name in filelist:
if fnmatch.fnmatch(name, pattern):
target.send(os.path.join(path, name))
@coroutine @coroutine
def opener(target): def cat(target):
while True: while True:
name = yield f = yield
f = open(name) for line in f:
target.send(f) target.send(line)
@coroutine @coroutine
def grep(pattern, target): def printer():
while True: while True:
line = yield line = yield
if pattern in line: sys.stdout.write(line)
target.send(line)
56
60. 리스트내포
리스트내포의일반적인문법
[표현식 for 항목1 in 반복가능객체1 if 조건1
for 항목2 in 반복가능객체2 if 조건2
...
for 항목n in 반복가능객체n if 조건n ]
이문법은대략다음코드로변환가능
s = []
for 항목1 in 반복가능객체1:
if 조건1:
for 항목2 in 반복가능객체2:
if 조건2:
...
for 항목n in 반복가능객체n:
if 조건n:
s.append(표현식)
60
61. 리스트내포
>>> a = [-3, 5, 2, -7, 10, 4]
>>> b = 'abcd'
>>> c = [2 * i for i in a]
>>> c
[-6, 10, 4, -14, 20, 8]
>>> d = [i for i in a if i >= 0]
>>> d
[5, 2, 10, 4]
>>> e = [(x, y) for x in a
... for y in b
... if x > 0 ]
>>> e
[(5, 'a'), (5, 'b'), ... , (4, 'b'), (4, 'c'), (4, 'd')]
61
62. 리스트내포
>>> f = [(1, 2), (3, 4), (5, 6)]
>>> g = [math.sqrt(x * x + y * y) for x, y in f]
>>> g
[2.23606797749979, 5.0, 7.810249675906654]
리스트내포안에서정의한반복변수유효범위
Python2 에서는리스트생성연산수행후에도남아있음
Python3 에서는내부변수로만사용됨
62
63. 생성기 표현식
생성기 표현식(generator expression)은리스트내포와동일한계산수행
결과를반복적으로생성하는객체
문법은괄호사용
실제로리스트를생성하거나표현식을바로평가하지않음
반복을통해필요할때값을생성하는생성기 객체반환
생성기 표현식문법
(표현식 for 항목1 in 반복가능객체1 if 조건1
for 항목2 in 반복가능객체2 if 조건2
...
for 항목n in 반복가능객체n if 조건n )
63
64. 생성기 표현식
>>> a = [1, 2, 3, 4]
>>> b = (i * i for i in a)
>>> b
<generator object <genexpr> at 0x10f235678>
>>> b.__next__()
1
>>> b.__next__()
4
>>> b.__next__()
9
생성기 표현식와리스트내포에대한연산결과는큰차이가 없지만,
특정응용프로그램상황에따라성능과 메모리효율을증가시킬수있음
64
65. 생성기 표현식
파일에서줄을추출해공백을제거하고 주석을추출하는부분은
실제로전체파일을읽지않음
실제파일내용은for 루프에서반복을시작할때줄단위로읽어
사용할뿐전체파일내용을메모리에올리는일은없음
>>> f = open('python_sample.py')
>>> lines = (t.strip() for t in f)
>>> comments = (t for t in lines if len(t) > 0 and t[0] ==
>>> for c in comments:
... print(c)
...
# db.app = flask_app
# db.init_app(flask_app)
# db.create_all()
...
65
71. 재귀
재귀를이용한factorial() 함수구현예
>>> def factorial(n):
... if n <= 1:
... return 1
... else:
... return n * factorial(n - 1)
...
>>> factorial(10)
3628800
71
72. 문서화문자열
함수의첫번째문장은주로함수를설명하는문서화문자열인경우가 많음
문서화문자열은함수의__doc__ 속성에저장
IDE 에서이를활용해도움말표시
>>> def factorial(n):
... """Computes n factorial. For example:
... >>> factorial(6)
... 120
... >>>
... """
... if n <= 1:
... return 1
... else:
... return n * factorial(n - 1)
...
>>> factorial.__doc__
'Computes n factorial. For example:nn >>> factorial(6)n
72
73. 문서화문자열
>>> help(factorial)
Help on function factorial in module __main__:
factorial(n)
Computes n factorial. For example:
>>> factorial(6)
120
>>>
(END)
73
74. 문서화문자열
장식자를사용할경우에는장식자래퍼로인해문서화문자열을
제대로가져오지못하는문제점발생
>>> def wrap(func):
... def call(*args, **kwargs):
... return func(*args, **kwargs)
... return call
...
>>> @wrap
... def factorial(n):
... """Computes n factorial. For example:
... """
...
>>> help(factorial)
Help on function call in module __main__:
call(*args, **kwargs)
(END)
74
75. 문서화문자열
장식자함수에서함수이름과 문서화문자열을가져오도록구현하는것 필요
>>> def wrap(func):
... def call(*args, **kwargs):
... return func(*args, **kwargs)
... call.__doc__ = func.__doc__
... call.__name__ = func.__name__
... return call
...
>>> help(factorial)
>>>
Help on function factorial in module __main__:
factorial(*args, **kwargs)
Computes n factorial. For example:
>>> factorial(6)
120
>>>
(END)
75