반응형

[ChatScript] ChatScript start & stop


설치 디렉토리 에서  ./BINARIES/의 CHARSCRIPT 명령어 실행. 


>chatscript 


Enter user name : 이름


한참 대화 후 종료할때 명령어. 


:quit


>:quit  

Exiting ChatScript via Quit


D:\>  



반응형
반응형


Scikit-Learn 을 이용한 전처리


문서 전처리 - Scikit-Learn 의 문서 전처리 기능 https://datascienceschool.net/view-notebook/3e7aadbf88ed4f0d87a76f9ddc925d69/

 

 


도서 카테고리 예측하기 프로젝트 #1 데이터 수집 및 전처리하기

 - http://www.sturdylad.co.kr/%EB%8F%84%EC%84%9C-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC-%EC%98%88%EC%B8%A1%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EB%8D%B0%EC%9D%B4%ED%84%B0%EC%A0%84%EC%B2%98%EB%A6%AC/


 도서 카테고리 예측하기 프로젝트 #2 데이터 학습 시키기

  - http://www.sturdylad.co.kr/%EB%8F%84%EC%84%9C-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC-%EC%98%88%EC%B8%A1%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EB%AA%A8%EB%8D%B8%ED%95%99%EC%8A%B5/


 도서 카테고리 예측하기 프로젝트 #3 생성된 모델로 텍스트 데이터 카테고리 예측해보기

 - http://www.sturdylad.co.kr/%EB%8F%84%EC%84%9C-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC-%EC%98%88%EC%B8%A1%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EC%98%88%EC%B8%A1%ED%95%98%EA%B8%B0/



...



반응형
반응형



6.2. 파일을 입맛대로(pickle, glob, os.path)

파일을 입맛대로 요리할 수 있도록 여러 가지 비법을 전수해드리지요. 먼저 조금 복잡한 자료를 파일에 쓰고 읽는 방법부터 알아봅시다. 이럴 때는 pickle(피클)이란 모듈을 사용합니다. 왜 피자 먹을 때 나오는 반찬을 이름으로 붙였는지…

예제로는 회원의 ID와 비밀번호를 파일에 저장하는 것을 생각해보았습니다.

>>> users = {'kim':'3kid9', 'sun80':'393948', 'ljm':'py90390'}
>>> f = open('d:/python21/exam/users.txt', 'w')
>>> import pickle
>>> pickle.dump(users, f)
>>> f.close()

처음에 ID와 비밀번호를 users라는 사전에 담았습니다. 그리고 users.txt라는 파일을 새로 열어서 f라고 했구요. 그 다음에는 오이지(pickle^^;) 모듈의 덤프(dump)를 사용했습니다.

여러분 덤프 트럭 다 아시죠? 왜 공사장에서 흙 싣고 다니는 무지 큰 트럭 있잖아요. 그런 차는 뒤쪽 짐칸을 들어올려서 흙을 와르르 쏟아내지 않습니까? 여기서 보시는 dump도 마찬가지입니다. users라는 리스트의 내용을 파일 f에 와르르 쏟아붓는 거지요. 음, 이렇게까지 설명할 필요는 없을 텐데… 오늘 쓸 것이 없다보니…

이제 메모장으로 users.txt 파일을 열어보시면 모양이 좀 지저분하긴 해도 데이터가 다 들어있는 걸 보실 수 있을 거예요.

그렇다면 이 파일에 들어있는 것을 원래대로 돌려볼까요? 원래대로 돌리는 것도 역시 오이지 모듈이 할 일이겠죠.

>>> f = open('d:/python21/exam/users.txt')
>>> a = pickle.load(f)
>>> print a
{'sun80': '393948', 'kim': '3kid9', 'ljm': 'py90390'}

사실 방금 보여드린 것은 그리 복잡할 것도 없지만 pickle 모듈은 파이썬에서 만들어지는 것은 뭐든지 다 파일에 적을 수 있다고 합니다. '그게 뭐 어때서'라고 생각하실지 모르겠지만 이건 놀라운 기능이라고 튜토리얼에 쓰여있습니다.

오이지는 이쯤 해두고, 전에 잠깐 구경했던 glob 모듈에 대해 알아보도록 하죠. glob는 파일들의 목록을 뽑을 때 사용하는데, 파일의 경로명을 이용해서 입맛대로 요리할 수 있답니다.

>>> import glob
>>> glob.glob('*.*')
['INSTALL.LOG', 'LICENSE.txt', 'NEWS.txt', 'py.ico', 'pyc.ico',
'pycon.ico', 'python.exe', 'pythonw.exe', 'readme.txt',
'UNWISE.EXE', 'w9xpopen.exe']
>>> glob.glob('*.txt')
['LICENSE.txt', 'NEWS.txt', 'readme.txt']

위의 별표(*)는 무슨 글자든, 몇 글자든 상관 없다는 뜻으로, 디렉토리(폴더)에 들어있는 파일들을 그냥 다 보려면 *.*라고 해주면 됩니다. 파일명에 상관 없이 확장자가 txt인 파일을 모두 보고 싶으면 *.txt라고 하면 되지요.

다음은 glob과 함께 os.path 모듈을 사용한 예제입니다.

>>> import os.path
>>> files = glob.glob('*')
>>> for x in files:
...     print x,
...     if os.path.isdir(x):                  # 디렉토리인가?
...             print '<DIR>'
...     else:
...             print ''

스크립트만 보고 어떤 일을 하는건지 짐작이 가시는지요?

둘째줄에서 glob.glob('*')를 해서 얻어진 파일 목록들을 files라는 리스트로 넣어줬습니다. 그 다음부터는 for 문을 통해서 파일명을 하나씩 출력한 다음 그것이 디렉토리이면 <DIR>이라고 출력해주고, 그렇지 않으면 그냥 줄만 넘겨주도록 했지요.



...


반응형
반응형

APM setpu시 80포트가 열려있다고 설치 안될때. 


제어판 > 관리 도구 > 서비스 > 아래의 서비스를 중지시킨다.



World Wide Web Publishing Service

SQL Server Integration Services 10.0

SQL Server Reporting Services(MSSQLSERVER)





APMsetup download :  http://kldp.net/apmsetup/release/


...

반응형
반응형

[Window] command 창 프로그램 - ConEmu


http://conemu.github.io/


About ConEmu 

ConEmu-Maximus5 is a Windows console emulator with tabs, which presents multiple consoles and simple GUI applications as one customizable GUI window with various features.

Initially, the program was created as a companion to Far Manager (FAR in Wikipedia), my favorite shell replacement - file and archive management, command history and completion, powerful editor.

Today, ConEmu can be used with any other console application or simple GUI tools (like PuTTY for example). ConEmu is an active project, open to suggestions.

Download ConEmu

Take a look at screencasts about ConEmu.

ConEmu screenshot

Votes and awards (vote for ConEmu, if you please).

Disclaimer 

ConEmu is not a shell, so it does not provide "shell features" like remote access, tab-completion, command history and others. ConEmu is advanced console window where you can run any shell of your choice. However, some of these features placed in RoadMap. Also you may try Clink for bash-style completion in cmd.exe and PSReadLine or PowerTab in powershell.exe.

Or even choose bash or any other unix-like shell from cygwinmsysgitmsys2mingw and others.

History 

This project grew up from ConEmu by Zoin.

Description 

ConEmu starts a console program in a hidden console window, and provides an alternative customizable GUI window with various features:

  • smooth and friendly window resizing;
  • tabs for editors, viewers, panels and consoles;
  • run simple GUI apps like PuTTY in tabs;
  • Windows 7 Jump Lists and Progress on Taskbar buttons;
  • easily run old DOS applications (games) in Windows 7 or 64-bit OS;
  • thumbnails and tiles in Far Manager;
  • normal, maximized and full screen graphical window modes;
  • window font anti-aliasing: standard, ClearType, disabled;
  • window fonts: family, height, width, bold, italic, etc.;
  • Chinese versions of Windows supported;
  • using normal/bold/italic fonts for different parts of the console simultaneously;
  • using 24-bit colors in Far Manager 3.x;
  • ANSI X3.64 and Xterm 256 colors;
  • cursor: standard console (horizontal) or GUI (vertical);
  • optional per-application settings (e.g. palette);
  • vertical console buffer scrolling using the keyboard (BufferHeight mode);
  • show full output (1K+ lines) of last command in Far Manager's editor/viewer;
  • customizable Far Manager right click behaviour (long click opens context menu);
  • drag and drop (explorer style) of files and folders in Far Manager;
  • limited support of BDF fonts;
  • user friendly text and block selection;
  • transparency and desktop mode;
  • customizable starting tabs;
  • configurable and clickable status bar;
  • and more, and more... take a look at DocumentationSettings pages and What's New.

All settings are read from the registry or ConEmu.xml file (multiple named configurations are supported), after which the command line parameters are applied. Parameters /Config and /BufferHeight can only be specified on the command line. Most settings are configured using the Settings dialog, not from the command line.

Requirements 

  • Windows 2000 or later.

Installation 

In general, ConEmu installation is easy. Just unpack or install to any folder and run `ConEmu.exe`.

For more information about installation options refer to Installation page.

반응형
반응형

꿈을 이룬 사람과 이루지 못한 사람의 차이는 고락력(苦樂力),

즉 고생이나 노력을 즐기는 힘의 차이다.

괴로움을 피하면 진정한 기쁨을 얻을 수 없다.

성공한 사람이라고 부르는 사람들은 괴로움과 역경을

아랑곳하지 않고, 오히려 즐기는 힘이 있었기 때문에

꿈을 이를 수 있었다.

- ‘매일 매일 긍정하라’ (니시다 후미오) 


명확한 목적과 목표를 가지고 있으면서,

자신을 믿을 줄 아는 사람은 괴로운 일도 즐기며 성장합니다.

보통 사람들은 이를 악물고 괴로움을 견디는 것을 노력이라 착각합니다.

월트 디즈니는 “인생에서 경험한 모든 역경, 고난,

방해가 나를 정직하고 강하게 해주었다.

힘든 일이나 괴로운 일은 감사한 일이다”고 말했습니다.



...

반응형
반응형

어른이란 

'한몫'을 하는 사람을 말한다. 

한몫을 맡아서 할 만큼 자랐다는 의미다. 

아이로만 알았던 아들이 커서 아버지 대신 

역할을 해낼 때 '이제 커서 한몫을 한다'고 표현한다. 

어른으로 대접을 받으면 울력에 참여할 수 있다. 

여럿이 힘을 합해 일하는 것을 울력이라 하는데, 

마을 울력에는 한 집에서 한 명씩 어른이 

참여해야 한다. 이 때 어른의 의미 역시 

한몫을 하는 사람이다. 



- 김준의《섬: 살이》중에서 - 



* 요즘 어른은

'한몫'만으로는 안됩니다.

두 몫, 세 몫, 열 몫을 해야 생존할 수 있고,

울력에 참여할 수 있습니다. '울력'은 파트너십을 

의미합니다. 두 몫, 세 몫, 열 몫을 해도 파트너십을

모르면 전체 일을 망가뜨리게 됩니다. 파트너십은

기본이고 여기에 서번트십까지를 더해야

제대로 한몫을 하는 것입니다.     



...


반응형

'생활의 발견 > 아침편지' 카테고리의 다른 글

단지 20초만 만져봐도...  (0) 2017.07.27
'산소가 씹힌다'  (0) 2017.07.26
온수기도 가끔 고장이 난다  (0) 2017.07.24
거울을 보라  (0) 2017.07.24
뒤처지는 사람  (0) 2017.07.21
반응형

[ChatScript]  ChatScript 를 Mac에 설치하기.


https://sourceforge.net/projects/chatscript/ 에서 다운받아서 설치. 


* 설치 설명 : http://exagen.tistory.com/42


맥에서 설치하면 기존 컴파일이 안되기 때문에 다른 방법이 필요함. 실행파일이 바이너리라 별도 작업 필요. 


폴더에 압축을 풀거나 직접 github에서 cloing을 한 후에는 src를 SRC로 컴파일해야합니다.

예제 / 기본 명령 줄 컴파일은 NON-WINDOWS NON-C / MAC / MacCompile.sh에 있습니다. 자세한 내용은 해당 디렉토리의 compile-on-osx.html을 읽으십시오.



mac install & run  참조 : https://github.com/bwilcox-1234/ChatScript/blob/master/WIKI/OVERVIEWS-AND-TUTORIALS/ChatScript-on-a-Mac.md





...


반응형

+ Recent posts