2013年5月30日 星期四

pyinstaller

convert your py file to exe file
user who can execute your program without python
Install:
just unzip to your file folder

Usage:
python pyinstaller.py /path/to/yourscript.py
or
python /path/to/pyinstaller.py yourscript.py

2013年5月6日 星期一

Weka FP Growth dataset

Weka FPGrowth needs Binary attributes, arff form likes this:


@relation FPGrowth dataset

@attribute a {1,0}
@attribute b {1,0}
@attribute c {1,0}

@data
0,0,0
0,0,1
0,1,0
0,1,1
1,0,0
1,0,1
1,1,0
1,1,1

2013年1月15日 星期二

SBCL


Steel Bank Common Lisp ( http://www.sbcl.org/ )

ubuntu:

Install SBCL

    ~$ sudo apt-get install sbcl
installed to
    /usr/bin
    /usr/lib
    /usr/share/doc

Running SBCL

    ~$ sbcl
    * (quit)     ;quit sbcl



ASDF: Another System Definition Facility ( http://common-lisp.net/project/asdf/ )

Install 

    ~$ sudo apt-get install cl-asdf
install to
    /usr/lib/asdf

SHOP2

Simple Hierarchical Ordered Planner (http://www.cs.umd.edu/projects/shop/)

~$ sbcl
* (require :asdf)
* (push "/home/user/experiment/shop2/" asdf:*central-registry*)    ;push shop2 folder path to asdf
* (asdf:oos 'asdf:load-op "shop2")    ;load shop2 in asdf
* (load "~/experiment/basic")    ;load shop2 domain, problem & plan which you define

2012年12月24日 星期一

dist-packages

source from :
http://stackoverflow.com/questions/9387928/whats-the-difference-between-dist-packages-and-site-packages

dist-packages is a Debian-specific convention that is also present in its derivatives, like Ubuntu.

/usr/lib/python2.7/dist-packages

easy_install and pip are installed from the package manager, they also use dist-packages, butthey put packages here:
/usr/local/lib/python2.7/dist-packages

you manually install Python from source, it uses the site-packages directory.


2012年11月28日 星期三

Apache2

#set apache2 server
~$ sudo gedit /etc/apache2/sites-available/default

# in this file set root, cgi-bin, and share doc 

DocumentRoot /home/user/yasam/www
ScriptAlias /cgi-bin/ /home/user/yasam/cgi-bin/

Alias /doc/ "/home/user/yasam/doc/"

 

2011年6月9日 星期四

open cv in python

Step 1: Download and install Python 2.7 & OpenCV 2.2
Step 2: Download and install NumPy 1.5.1 & SciPy 0.9.0rc5
Step 3: Setup Windows Path in Environment Variables(Add “C:/Python2.7;C:/OpenCV2.2/bin” to PATH)
Step 4:  Copy the content of folder “C:/OpenCV2.2/Python2.7/Lib/site-packages” to folder “C:\Python27\Lib\site-packages“