python 및 머신러닝 교육, 슬로우캠퍼스



nginx 설정 설명


server {
    listen  80;
    server_name demo.abc.com;
    charset utf-8;

    access_log /home/ubuntu/app/log/nginx/demo_abc_com_access.log;
    error_log /home/ubuntu/app/log/nginx/demo_abc_com_error.log;

    location / {
            proxy_pass                          http://127.0.0.1:8000;
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
    }
}



location block의 모습

location optional_modifier location_match {

    . . .

}

 

location을 match할때는 다음 순서로 이루어진다.

  1. URL의 prefix가 일치하는지 먼저 검사하여, 일치하는 것이 발견되면 기억해 놓고, 다음 location match를 수행한다. 즉 멈추지 않는다.
  2. regular expression과 일치하는 것이 있는 검사한다.
  3. 최종적으로 일치하는 regular expression이 있으면 그것을 선택하고, 없으면 1번에서 발견한 prefix 일치하였던 것을 리턴한다.
  4. prefix match 중에 '=', '^~' 로 수식된 것에서 prefix 일치가 발견되면 regular expression 비교 수행하지 않고 바로 리턴한다. (1번의 예외상황)

 


location block에서 optional_modifier 의미

  • = 는 exact match를 의미.  RE 진행하지 않음
  • / 및 /abc 는 prefix를 의미 
  • ~는 regular expression(대소문자 구분함)을 의미.  ~*는 대소문자 구분없는 RE(regular expression)
  • ^~는 match된 경우에 RE 진행하지 않음 이라는 의미.


location = / {    
    [ configuration A ]
}

location / {
    [ configuration B ]
}

location /documents/ {
    [ configuration C ]
}

location ^~ /images/ {
    [ configuration D ]
}

location ~* \.(gif|jpg|jpeg)$ {
    [ configuration E ]
}

nginx 설정

 

/etc/nginx/sites-available 아래에 파일을 생성하고,  

/etc/nginx/sites-enabled 에서 링크를 연결한다 (ln -s /etc/nginx/sites-available/xyz . ) 


참고 - https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms



WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스





요즘 스크래치(scratch)와 연동되는 장난감 로봇 같은 제품들이 나오고 있습니다.

이러한 장난감을 스크래치를 통해 직접 제어하면서 SW 및 프로그래밍의 개념을 쉽게 익힐 수가 있습니다.

이런 장난감을 스크래치(scratch)에서 제어하려면 scratch extension 모듈을 개발하여야 합니다.

 scratch extension 모듈은 스크래치로부터 명령을 받아서, 장남감을 제어하는 아두이노(Arduio) 또는 전용의 임베디드 시스템을 USB (UART) 통신을 통해 제어하는 기능을 제공해야 합니다.

이러한  scratch extension 모듈 개발이 필요하신 분은 연락 주세요. 

(handol 지메일 입니다. 제목에 [스크래치] 라고 붙여주세요)


아래 동영상은 다른 프로젝트에서 개발 결과물의 동작을 짧게 촬영한 것입니다.

스크래치 화면에서 부저 센서에 '도', '레'  플레이 명령어를 보낸 것입니다.


모듈간의 연동 방식은 다음과 같습니다.

스크래치 (scratch) <-- HTTP --> 확장 모듈(개발한 모듈) <-- USB 통신 --> 아두이노 또는 장남감 블록(마스터) <-- BLE --> 센서 블록 






스크래치,아두이노까지 코딩교육은 캐릭터를 입은 로봇 디오와 함께!





http://www.wadiz.kr/Campaign/Details/828




큐브로이드 : 소프트웨어 교육을 위한 로봇 블록



http://www.wadiz.kr/web/campaign/detail/3429


WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스








Google App Engine 에서 Flask 기반으로 개발하기


PyCharm을 이용하여 GAE(Google App Engine)에 Flask 기반으로 'Hello World'를 만들고,

실제로 deploy 하기까지의 설명을  간단하면서도 잘 설명하였다.


PyCharm 의 Google App Engine 개발 환경 세팅에 대해서도 잘 나와있다.





WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스



https://developer.expectlabs.com/docs/crawlerConfiguration



{ "uri": "http://www.techcrunch.com", "whitelist": [ { "starts-with" : "/2014/" } ], "blacklist": [ { "contains" : "evernote" } ] }



  • { "uri": "http://www.techcrunch.com",
      "whitelist": [ { "starts-with": "/2013/" },
                     { "matches-regex": "^/[0-9]{4}/(04|05|06)/" } ],
      "blacklist": [ { "contains": "google" } ] }



WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스



http://www.linkedin.com/today/post/article/20140425140237-16911014-worry-about-the-things-that-you-can-change



Are you a worrier? Do you worry that you get worried by small things, big things, ALL things? The thing is – worrying takes up a lot of time and energy that can be better used elsewhere. Dispense with it wherever possible.

Worrying is a common human emotion that usually occurs when an outcome is uncertain, or something might happen over which we have no control. Let’s think about control for a moment.

This thing you worry about. Do you have any control over the matter? Can you change it? If you don’t have any control over what’s worrying you, and you can’t change it – then don’t worry.

If you think you should be able to control everything – who appointed you Managing Director of the Universe?

You may not be able to control events or other people, but you can control your own emotions. You can take control of worrying, and if you like, delete it from your life. No worries.

Does the thought of having no worries worry you?

You probably already know that anxiety and worry cost time and add no value whatsoever to what you are doing. So why do it?

Do you only worry about work-related things, or does anxiety affect your personal life too? Whether you suffer from worrying about a particular thing – your health, your marriage – or from what is known as ‘free-floating anxiety’ – worrying about all sorts of things you can’t affect, or worrying about things in general, then you’ve probably realised that you may need more help than I can provide here. For now, we will allay your mild, niggling worries. and help you to control that tendency.

If you are somebody who does worry, what is causing that?

Dean Hawkes of Columbia University once said “Half the worry in the world is caused by people trying to make decisions before they have sufficient knowledge on which to base a decision.”

He makes a very good point. So – get the facts, weigh them up and then make a decision. The important thing to do once you have made your decision is to ACT on it. Don’t procrastinate. Don’t spend your time worrying about what could go wrong. Look instead at the positives, and focus on them.

Before you are tempted to worry about a problem – take stock of it and ask yourself the following:

  • What is the problem?
  • What is the cause of the problem?
  • What are the possible solutions?
  • What is the best solution?

You will be amazed how simple the initial “worry” will become and how easily resolved it can be.

If this approach does not work for you, then you can take it one step further, and pander to your need to catastrophise. Face the very worst case scenario. Ask yourself these 3 questions:

  • What is the absolute worst thing that could happen?
  • What are the chances of this actually happening?
  • What would I or could I do about it, if that did happen?

Considering worst case scenarios, then visualising and finding solutions for them, is one of the best ways to deal with anxieties. You may find that the worst thing that can happen isn’t insurmountable. Or you may be able to laugh at the ridiculousness of your worry when you actually put it into perspective.

Jack: OMG! I have forgotten my mother-in-law’s birthday party! OMG! I am a dead man! I can’t go home. What am I going to do?
Jill: What’s the worst thing that can happen?
Jack: She might never speak to me again!
Jill: That’s the worst thing. Your mother-in-law won’t talk to you.
Jack: Yeah. Oh. Wait. No. That’s not so bad.
Jill: OK. So what’s the worst thing?
Jack: My wife will kill me?
Jill: Really. How, precisely, will she kill you?
Jack: Painfully. Oh, you mean, how? Erm. With a look. That look.

Focus on a solution. Your entrepreneurial creativity will find solutions to even the toughest scenarios. This exercise gets you to confront your worst fears and – more importantly – to provide practical resolutions for them. Once you have a plan to address the worst thing that can happen, the problem and uncertainty is minimised. That allows you to move on.

After you have considered your worst case scenario, if you do discover that there is nothing you can do about it, embrace the certainty. It can be a relief to be absolved of choice and resign yourself to the inevitable. If you know something is going to happen and you cannot change it, then live with it! Enjoy the ride and enjoy the learning, since there is nothing else you can do.

Another common problem is worrying about the past. Now, I have met some very clever people in my time, but I have yet to meet anyone who can turn back time. Don’t waste time worrying about something in the past that has gone. There is nothing you can you can do about it, other than to learn from it and take the learning forward to inform the future. Leave unhelpful emotions in the past, where they belong. Reflect on what has happened. Reflect on what you have learnt about what has happened. Decide what you’ll do differently in the future. Embrace it as a great learning opportunity, and move on.

Develop a positive mental attitude. Know that it takes as much time and energy to do something about a problem or fix the thing we’re worried about, as it does to worry about it. Instead of sitting worrying – do something, and sort it out!

Worry adds no value to your life. If you must worry at all, develop processes that minimise the time spent worrying by setting a time constraint. Say,OK, I am going to spend five minutes worrying about this, and then I am going to move on.Work through your worry methodically, until you reach conclusions and find solutions or come to an acceptance. Within those five minutes!

Above all, recognise your role in being able to change things. If you can do something, that’s great. Do it.

If you can’t, just don’t waste your energy thinking about it. Think of positive things you can do. Life is too short!

Further Reading:

Feel the Fear and Do it Anyway by Susan Jeffers (Amazon LinkUK,US)

The Power of Now by Eckhart Tolle (Amazon Link UK,US)

How to Stop Worrying and Start Living by Dale Carnegie (Amazon LinkUK,US)

If the above topic, or indeed any of my blogs are of interest to you, then sign up to my weekly blog at www.theviewinside.met or email me at getintouch@marcwinn.com

Marc


WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스



The Future of Virtual Reality







WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스


HTTP redirect 처리하기

curl 명령어로 redirect가 발생하는 지 확인할 수 있다.  --head 옵션을 사용한다.

curl --head  http://j.mp/174gpKP

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Thu, 05 Jun 2014 04:21:44 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Cache-Control: private; max-age=90
Content-Length: 153
Location: http://nolboo.github.io/blog/2013/10/17/start-blog-with-harp/
Mime-Version: 1.0
Set-Cookie: _bit=538ff058-00317-06caf-3b1cf10a;domain=.j.mp;expires=Tue Dec  2 04:21:44 2014;path=/; HttpOnly



http://j.mp/174gpKP 이라는 short URL의 원본 URL을 알고 싶다면

HTTP 301 redirect를 처리할 수 있어야 한다.  (302, 303 등도 있음)



>>> import urllib

>>> a = urllib.urlopen("http://j.mp/174gpKP")

>>> a.geturl()
'http://nolboo.github.io/blog/2013/10/17/start-blog-with-harp/'


urllib2를 이용한 방법도 있지만, 조금 복잡하다. class 정의 필요.

http://www.diveintopython.net/http_web_services/redirects.html




'Data/Text/Knowledge Analysis & Mining > Python' 카테고리의 다른 글

mechanize 예시  (0) 2013.10.18
[Git] 기본 설정 및 사용  (0) 2013.07.30
python pdf - reportlab  (0) 2013.07.26
OCR + python  (0) 2013.07.26
python pdf library 비교  (0) 2013.07.26

WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스

잘 설명된 곳

http://www.pythonforbeginners.com/cheatsheet/python-mechanize-cheat-sheet/




간단 코드


import mechanize
import urllib
import random

class Transaction(object):
        def run(self):
                br = mechanize.Browser()
                br.set_handle_robots(False)
                resp = br.open('http://aaa.com/')
                resp.read()

'Data/Text/Knowledge Analysis & Mining > Python' 카테고리의 다른 글

python 에서 http redirect 처리하기 (short url 처리)  (0) 2014.03.20
[Git] 기본 설정 및 사용  (0) 2013.07.30
python pdf - reportlab  (0) 2013.07.26
OCR + python  (0) 2013.07.26
python pdf library 비교  (0) 2013.07.26

WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스

위자드웍스가 흥미로운 일을 하고 있었네요. 




image

(Full version 포스터를 보시려면 위 이미지를 클릭하세요!)

안녕하세요!

3월 개강을 맞이하여 위자드웍스에서 5년만에 대학생 서포터즈 프로그램 '위자드웍스 마법학교' 신입생 모집 소식을 들고 찾아왔습니다.

5년 전 무려 400:1을 경쟁률을 기록할 만큼 당시 최고의 대학생 참여 프로그램으로 기억되는 위자드웍스의 ‘호그와트 마법학교’가 2013년 3월 ‘위자드웍스 마법학교’로 이름을 바꾸고 새 친구들을 기다립니다.

그동안 호그와트 마법학교를 거쳐 간 멘토들과 졸업생들은 현재 Google, Microsoft, 삼성전자, LG전자, SK텔레콤, NHN, Daum 등 국내·외 수 기업에서 활발한 활동을 펼치고 있습니다.

특히 이번에 모집하는 ‘위자드웍스 마법학교 4기’는 한 분씩 따로 만나기도 힘든 국내 최고의 멘토진들을 만날 수 있는 값진 멘토링 프로그램을 마련했습니다.

또한 이제는 각기 주요 기업에 입사한 호그와트 선배들과 함께하는 선배 멘토링도 준비되어, 기업의 홍보만을 주로 하는 여타 대외활동에서는 얻을 수 없는 진정한 삶의 배움과 경험들을 얻을 수 있으리라 확신합니다.

그럼 톡톡 튀고 열정 넘치는 대학생 여러분의 많은 지원 바랍니다. 3기 종료 후 4년이 지난 지금까지도 네이버 ‘대학생 대외활동’ 검색순위 Top 5에 들고 있는 감동의 대학생 프로그램 ‘호그와트 마법학교’가 돌아옵니다.

여러분의 4년간의 기다림에 부응하는 최고의 프로그램으로 보답하겠습니다.

감사합니다!

—-

<위자드웍스 마법학교 4기 멘토단 소개>

이택경
프라이머 대표
포털사이트 Daum 공동창업
Daum의 CTO로 13년간 재직 후
현재 20여개 벤처기업 육성하며 활발히 후진 양성중

Mickey Kim (김현유) 
Google 본사 상무
국내 대학 인문학도 출신으로
35세에 구글 본사 한국인 최연소 상무가 되다.
베스트셀러 <꿈을 설계하는 힘> 저자

박지웅
패스트트랙아시아 대표
벤처캐피털 업계 최연소 심사역 출신으로
인터넷/모바일 20여개 회사에 300억 투자 리딩
초기 투자한 티켓몬스터가 3천억 규모로 M&A

표철민
위자드웍스 대표
중3 때 첫 창업 후 3전 4기 끝에
솜노트를 들고 돌아온 29세 13년 차 CEO
美 BusinessWeek <아시아를 대표하는 젊은 기업자 25인> 선정

그 외에도 깜짝(!) 놀랄 멘토들이 마법학교를 찾아옵니다.

—-

<위자드웍스 마법학교 4기 모집 안내>

1. 모집요강

지원자격 : 국내∙외 대학교에 재학(또는 휴학) 중인 대학생
전공 무관. 서울 및 수도권 거주자에 한함
* 오프라인 활동 및 뒤풀이 모임 참석 가능자

모집인원 : 총 50명
* 개인 또는 팀을 구성하여 지원 가능하며, 팀당 구성인원은 최대 4인으로 제한

(팀원 전체의 능력과 팀웍이 뛰어나면 팀 지원이 유리하지만 단순히 친하다는 이유로 팀으로 지원시에는 오히려 팀 내 유능한 친구조차 탈락할 수 있으므로 잘 고민하여 지원해 주세요.)

우대능력 : 1) 카카오톡 대화방을 오른쪽으로 넘기면 들어가 있는 솜노트솜투두 앱에 대한 이해 2) 스마트폰 및 SNS를 활발히 사용하는 사용자 3) 남부럽지 않은 열정과 똘끼의 소유자 4) 스펙이 아닌 경험, 인맥이 아닌 친구를 만들고자 하는 뜨거운 사람들을 선호함

지원기간 : 2013년 3월 11일 (월) ~ 3월 26일 (화) 오후 6시

지원방법 : 위자드웍스 홈페이지 솜클라우드 페이스북 페이지 내 마법학교 지원서 다운로드 및 작성 후 school@wzd.com 으로 이메일 접수

(접수시 메일 제목은 개인 지원의 경우 ‘[개인] 한국대 홍길동’ 형태로, 팀의 경우 ‘[팀] 우리가짱이다’ 형태로 해주세요.)

전형일정 : 서류합격자 개별 연락. 3월 마지막주 면접 진행 예정
입학식 : 4월 초 입학 예정. 입학식 불참시 합격이 취소됩니다.

※ 지원서 다운로드 링크

개인 지원서 : http://bit.ly/XYWu7G 
팀 지원서 : http://bit.ly/VOxGAF

2. 활동안내

활동내용 :

1) 위자드웍스의 대표 제품 솜노트∙솜투두의 캠퍼스별 소개 활동
2) 추후 위자드웍스에서 출시될 서비스들에 대한 선체험 및 제품 피드백
3) 솜클라우드 브랜드 마케팅 아이디어 제안

활동기간 : 2013년 4월 초 ~ 7월 초 (3개월)
* 마법학교 정기 일정은 시험기간을 제외한 매주 금요일 저녁 예정

활동혜택 :

1) 수료자 전원에게 위자드웍스 마법학교 인턴쉽 수료증 수여
2) 최우수자 2인에게 위자드웍스 본사 정식 인턴쉽 기회 부여
3) 국내 최고 수준 멘토들의 특별 강연 초대
4) 마법학교 멘토들과의 1:1 멘토링 프로그램 참여
5) 위자드웍스 본사 행사 우선 초청
6) 캠퍼스별 이벤트 비용 지원
7) 우수자 특전 포상

* 진한 추억과 함께 기억되는 마법학교 4기 멤버들

3. 지원 관련 문의

마법학교 모집과 관련된 모든 궁금증은 아래로 문의해 주세요.

이메일 : school@wzd.com
페이스북 : facebook.com/somcloud
트위터 : @somcloud

—-

"위자드웍스 마법학교가 신입생을 뽑지 않는 지난 4년 동안에도 네이버 검색 순위에 계속 올라 있을만큼 인기를 끌었던 것은 마법학교의 초기 설립 모토가 ‘사람을 남기는 대학생 프로그램’이었기 때문입니다. 그만큼 함께 활동하는 멘토들, 동료들과의 끈끈한 우정에 모든 초점을 맞추고 있는 프로그램인만큼 믿음으로 참여하셔도 좋습니다. 제가 할 수 있는 한 최선의 노력으로 회사는 물론 참여하는 학생들의 삶에 실질적인 도움이 되는 프로그램이 될 수 있도록 하겠습니다.”

- 위자드웍스 CEO 표철민



WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스



Protovis


http://mbostock.github.io/protovis/ex/force.html



D3


http://d3js.org/


http://www.jasondavies.com/wordcloud/#http%3A%2F%2Fen.wikipedia.org%2Fwiki%2F%7Bword%7D=cloud



WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,