태그

2015년 3월 4일 수요일

Data Science with Python

출처 : "Ultimate Skills Checklist for Your First Data Analyst Job" by Udacity

Python programming language
: Python is a high level programming language with many useful packages written for it

[Python packages (“modules”)]
- NumPy
: an optimized python library for numerical analysis, specifically: large, multi-dimensional arrays and matrices. Found in Introduction to Data Science
http://www.numpy.org/
http://en.wikipedia.org/wiki/NumPy

- pandas
: an optimized python library for data analysis including dataframes inspired by R. Found in Introduction to Data Science
http://pandas.pydata.org/
http://en.wikipedia.org/wiki/Pandas_(software)

- matplotlib
: a 2D plotting library for python, includes the pyplot interface which provides a MATLAB-like interface (see ipython notebooks and seaborn below). Found in Introduction to Data Science
http://matplotlib.org/
http://en.wikipedia.org/wiki/Matplotlib

SciPy
: a library for scientific computing and technical computing. Found in Introduction to Data Science
http://www.scipy.org/
http://en.wikipedia.org/wiki/SciPy

scikit-learn
: machine learning library built on NumPy, SciPy, and matplotlib. Mentioned in Introduction to Machine Learning
http://scikit-learn.org/stable/
http://en.wikipedia.org/wiki/Scikit-learn

[optional]
iPython
: an improved interactive shell for python with introspection, rich media, additional shell syntax, tab completion, and richer history
http://ipython.org/
http://en.wikipedia.org/wiki/IPython

iPython notebooks
: a web-based interactive computational environment
http://ipython.org/notebook.html
http://en.wikipedia.org/wiki/IPython#Notebook
hosting: http://nbviewer.ipython.org/

anaconda
: a python package manager for science, math, engineering, data analysis with the intent of simplifying and maintaining compatibility between library versions. Also useful for getting started with ipython notebooks.
http://continuum.io/downloads

ggplot: and (in-progress) port of R’s ggplot2 which premised upon a grammar of graphics
http://ggplot.yhathq.com

seaborn: a Python visualization library based on matplotlib with a highlevel interface
http://web.stanford.edu/~mwaskom/software/seaborn/

Strata+Hadoop WORLD PyData 후기

http://strataconf.com/big-data-conference-ca-2015/public/schedule/full/public

PyData at Strata


  • 머신러닝 라이브러리는 scikit-learn 활용
  • 시계열성 시각화는 Bokeh
  • 성능상 이슈가 있다면 Numba
  • 데이터 로딩을 위해서는 Pandas
  • 모든 작업은 iPython Notebook 으로..
  • ipynb 공유를 위해서는 Jupyter로..

Description

PyData
Python has become an increasingly important part of the data engineer and analytic tool landscape. Pydata at Strata provides in-depth coverage of the tools and techniques gaining traction with the data audience, including iPython Notebook, NumPy/matplotlib for visualization, SciPy, scikit-learn, and how to scale Python performance, including how to handle large, distributed data sets. Come see how the leading lights in the Python data community are making Python ever more useful to data analysts and data engineers.
9:00am – 10:30am
Track 1 (room LL21 B):
  • Machine Learning with scikit-learn
    Andreas Mueller
scikit-learn has emerged as one of the most popular open source machine learning toolkits,
now widely used in academia and industry. scikit-learn provides easy-to-use interfaces to perform advanced analysis and build powerful predictive models. The tutorial will cover basic concepts of machine learning, such as supervised and unsupervised learning, cross validation and model selection. We will see how to prepare data for machine learning, and go from applying a single algorithm to building a machine learning pipeline.
11:00am – 12:30pm
Track 1 (room LL21 B):
  • Interactive Web Graphics with Bokeh
    Peter Wang
Bokeh is an open-source library for building web graphics, ranging from simple interactive plots to complex dashboards with streaming data sources.  This is tutorial will quickly introduce some of the basic concepts behind Bokeh and then dive into a step-by-step series of exercises which showcase how to embed interactive graphics in an IPython notebook and build more complex linked graphics.  Streaming and large datasets will also be demonstrated.
1:30pm – 3:00pm
Track 1 (room LL21 B):
  • Intro to Numba and Performance Python
    Travis Oliphant
Numba is a just-in-time compiler for Python that can translate a wide range
of Python functions into high performance machine code at runtime. This
tutorial will give an overview of the capabilities of the Numba compiler and
walk through several examples showing how to use Numba to generate fast 
implementations of numerical algorithms from pure Python. We will briefly
touch on more advanced features of Numba, such as compiling for the GPU, at
the end.
Materials:
A basic installation of Anaconda. Example IPython notebooks will be posted to
GitHub before the tutorial.
3:30pm – 5:00pm
Track 1 (room LL21 B):
  • Analytics Beyond the Basics with pandas and SQL
    Wes McKinney
In this tutorial, we’ll take a tour through a variety of useful, but sometimes tricky analytical tasks and show how they can be tackled with pandas or SQL. A part of the goal is to illustrate how SQL concepts map onto the pandas API and vice versa, and for the participant to learn more about advanced usage of each of the tools.
Materials will be posted at http://github.com/wesm/strata-sj-2015

2015년 2월 11일 수요일

SW개발자, 프레임워크로 내공쌓기 - 생보사 차세대 프로젝트

오늘은 그 토록 원하던 프레임워크팀으로 전배 한 뒤, 투입되어 5년간 진행했던 2개 대형 프로젝트 중 첫 번째 프로젝트에 대해서 애기 해보고자 한다.

2008년 말, 입사 2년차에 만 2년을 앞두고 원하던 부서로 옮긴 나는, 이제 프로젝트에 대한 욕심이 생기기 시작했다. 그때 당시에는 웬지 모르겠지만 금융권 프로젝트를 하고 싶었다. 그 동안, 국방, 공공, 대내 작은 프로젝트만 다녀서 그랬는지 모르겠지만, 웬지 금융권에서 돈과 관련된 프로젝트를 하면 돈을 만질 수 있을 거 같은 느낌이 들었을까.. 솔직히 그냥 해보고 싶었다.

마침 관계사 중 생보사 대형 차세대 프로젝트가 곧 시작될 예정이였고, 금융권에서는 거의 최초로 기존 레거시 시스템 전체를 Java로 전환하는 대규모 프로젝트였다. 난, 2주 정도 신규 팀에서 OJT를 받다가, 바로 해당 프로젝트에 투입이 되었다.

실은, 그 당시 같은 팀원 사람들을 보면 프로젝트에 투입되는 것을 그리 반기지 않았던 걸로 기억한다. 아무래도 본사 사무실에서 프레임워크 개발하는 것 보다 훨씬 업무 강도도 세고, 고객 눈치도 봐야 하고, 플젝 납기 기한도 맞춰야 되고.. 이리저리 신경 쓰이는 일이 많아서 일 것이다. 하지만, 난 그게 더 좋았다. 특히, 비즈니스에 대해서도 이해하고 싶어 했던 의지가 있었고, 젊을수록 더 고생해야 더 많이 배울 수 있을 것이라는 생각이 지배적이였다. 이런 내 생각과 의지는 앞으로 회사 생활하는 데 굉장히 많은 긍정적인 영향을 미쳤었다.

해당 프로젝트의 기존 시스템은 Cobol 기반이였고, Java로 전환하기 위해 SDS의 Java Spring 기반의 Anyframe Enterprise 기반으로 차세대 시스템을 구축하기 시작했다. Anyframe Enterprise 내의 OLTP, Batch, BTO(Center Cut)등의 제품들이 적용되었고, Anyframe Integration을 통해 대외계 연계까지도 적용을 한 프로젝트이다. 실은, 이때까지만 하더라도 Anyframe Enterprise 버전의 방향성과 로드앱에 대해서 구체적인 plan이 있지는 않았던 걸로 기억한다. 하지만, 대형 차세대 프로젝트의 도메인 지식 기반으로 해서 2년 동안 완성도가 무척 높아졌고, 이후에 대부분의 대형 프로젝트에서 러브콜이 쇄도 했었다. 팀원 모두 수 년간 무척 바쁘게 지내왔었다.

이해를 돕는 차원에서 Anyframe Enterprise에 대한 동영상 링크를 공유 한다.
http://vimeo.com/67370902
시간이 얼마 안 지났는데, 좀 유치한듯..ㅡㅡㅋ 현재는 잘 활용하지 않는 레전드임..ㅋ

내가 담당했던 업무는 BTO(Batch Type Online) 혹은 Center-Cut 이라는 이름의 프레임워크였다. 컨셉은 일반 배치 보다 비즈니스 로직이 복잡하고, 단발성 OLTP의 대량 처리를 위한 분산 병렬 처리 프레임워크라고 볼 수 있다.위 동영상의 일부를 캡쳐 해 보았다. 



내가 초기에 그렸던 그림이 이렇게 변한 듯 하다.

Admin은 Center Cut의 작업을 관장하는 녀석이다. Center Cut Job을 등록 및 관리 하며, Job내의 다양한 기본 정보들을 핸들링 한다. 병렬 처리 할 쓰레드 개수라던지, 전처리/후처리 방법, 실행 시간/주기, Job간의 의존성/우선순위 등으로 볼 수 있겠다. 이렇게 정의된 Job은 구동시 각 서버에 설치되어 있는 Center Cut Engine에게 명령을 내린다. 그럼 Engine들은 자기가 할당 받은 쓰레드 개수 만큼 쓰레드를 생성시켜, 매핑되어 있는 다수의 WAS로 Online 모듈 호출을 시도 한다. 이는 가령 계좌 이체의 대량 처리인 회사 급여 이체 등의 비즈니스 로직에 적용이 가능하다.

이런 처리 기법은 기존 Cobol 대비 배치성 업무 수행 속도가 현저히 느릴 것이라는 JVM 기반의 Java가 가지는 단점을 보기 좋게 극복하는 좋은 사례가 되었으며, 기존 시스템 보다 오히려 처리 속도가 빨라졌다.

이 프레임워크를 개발 할 때, 일손이 부족하고 국내에는 기술력 놓은 인력들을 구하기 쉽지 않아서, 외주용역을 활용하였었다. 이때, 벨라루시의 한 업체와 업무를 진행하였는데, 그 당시만 하더라도 영어로 일하는 것이 다소 생소한 시기라 매주 컨퍼런스 콜이나 daily meeting 시에 알아듣기 힘든 러시아식 발음의 영어와 씨름 하기도 하였지만, 곧 적응이 되었고, 외국인 들과 일하는 것이 한편으로는 한국 개발자들과 일하는 것과의 차이가 커서 힘든 점도 많았지만, 영어 뿐만이 아니라 개발 방식에 대한 부분에서도 배울점이 무척 많았다. 그리고, 오픈 전 1년은 0.5 M/D(한명이 하루 반나절만 지원)만 계약을 하여 업무를 진행하였기 때문에, 짧은 시간에 필요한 내용들에 대해서 의논하고 대부분의 핵심 업무들은 내가 직접 진행 할 수 있어서 설계 및 개발/테스트 역량을 많이 끌어 올리는 계기가 되었다.

그리고 이 시점에 서서히 알려지고 있었던 애자일 방법론에 대해 공부하여 실 프로젝트에 적용까지 함으로써, 애자일 사상에 대해 동경하고 따르게 되는 계기가 되었었다. 

해당 프로젝트는 24개월동안 많은 사람의 노력과 열정으로 완성이 되었고, 잘 마무리 되어 성공적으로 오픈하게 되었다. 이후 주변의 많은 보험사들이 해당 프로젝트 성공이후에 Java로 전환하는 프로젝트를 진행하게 되었고, 이는 훗날 SDS에서 처음이자 마지막으로 수행한 제 1금융권 차세대 프로젝트에 까지 영향을 끼쳤다고 생각한다.

2010년 11월경, SDS는 Anyframe 프레임워크 전체 제품에 대한 대외 컨퍼런스를 개최하게 되었다. 이때, Center Cut에 대한 발표를 직접 하였었고, 발표자료 링크를 공유 한다.

지금 생각해보니, 프로젝트 수행 당시 매일 야근과 휴일에 근무하기를 반복.. 연휴도 없이 지내면서 무척 힘들었지만, 가장 열심히 일해야 할 때, 좋은 프로젝트의 전체 싸이클을 경험하면서, 주요한 프레임워크 설계/개발에 깊이 참여하였고, 프로젝트내 개발자와 해외 개발자들과 협업하면서 만들어낸 산출물들이 좋은 결과로 이어진 것이 나에게는 큰 행운이 아니였나 싶다.

>_

기억에 남는 기술 : Java, Spring OLTP/Batch, WebLogic, Oracle, GWT, Apache MINA, JBoss Jgroups, Multi-Threading, Agile development




-- My Story ---------------------------------------










---------------------------------------------------