Archive

Archive for May, 2012

color design for vision impaired

May 23, 2012 Leave a comment

A very neat website for color design especially for color vision impaired.

http://colororacle.org/

Image

Advertisements

Fix UIActionSheet Cancel Button

May 22, 2012 Leave a comment

I found that using the UIActionSheet, it seems that the “Cancel” button does not function well. It turns out to be a normal problem, where here gives the right answer. I followed the instruction and changed the code (self — is the

from

[self.actionSheet showInView:self.view]; // show from our table view (pops up in the middle of the table)

to

[self.actionSheet showInView:self.parentViewController.tabBarController.view];

Categories: MacOS, Objective-C, Programming

ios Image Proc

May 22, 2012 Leave a comment

Well opencv is a good thing, but sometimes really hard to do the configuration. Depends on your purposed, if just for simple image processing, there are actually several example codes where you can learn from .

1) GLImageprocessing by Apple

2) http://www.cocoaintheshell.com/

3) http://code.google.com/p/simple-iphone-image-processing/

4) https://github.com/esilverberg/ios-image-filters

Categories: MacOS, Objective-C

pyGraph

May 18, 2012 Leave a comment

It seems that python-graph is a nice tool. To install it, I used
the easy install.

My desktop is Win7 with Git, so install easy_install using:

$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py

I found that my Git actually can not local where the easy_install is. So
simply way: find by your self. You may find a application file “easy_install.exe”
within your python folder. Then use:

$/c/Python27/Script/easy_install python-graph-core
$/c/Python27/Script/easy_install python-graph-dot

Then, you done 🙂

Categories: Python

bbfreeze tryout

May 10, 2012 Leave a comment

It appears that bbfreeze is much more simpler than py2exe. Just try out this afternoon.

– Download bbfreeze: http://pypi.python.org/pypi/bbfreeze/#downloads

– You can either choose to use the command line or simple put the below code in a setup.py file ( you can name it as you want):

#!/usr/bin/python

from bbfreeze import Freezer
f = Freezer("YOURPROJ_exe-1.0", includes=("_strptime",))
f.addScript("YOURPythonFile.py")        # If there are multiple source files, just repeat this to add more
f() # starts the freezing process

– Run this set up, and bbfreeze will create a subfolder: <YOURPROJ_exe-1.0> where all the dependencies and other stuff will go into

– Your compiled exe file is YOURPythonFile.exe

– Assuming your python file takes into the commands  $YOURPythonFile.py command1  command2

It will be same when using the exe: $YOURPythonFile.exe command1  command2

Categories: Python

AI in motion blog

May 9, 2012 Leave a comment

Very nice blog, I especially like the python part.

1. About logistic regression: http://aimotion.blogspot.com/2011/11/machine-learning-with-python-logistic.html

2. The PyCon Videos: http://aimotion.blogspot.com/2012/03/some-data-and-machine-learning-talks.html

Categories: Python

May 2, 2012 Leave a comment

Python Conquers The Universe

In August 2009, I wrote a post titled Introduction to Python Decorators. It was an attempt to explain Python decorators in a way that I (and I hoped, others) could grok.

Recently I had occasion to re-read that post. It wasn’t a pleasant experience — it was pretty clear to me that the attempt had failed.

That failure — and two other things — have prompted me to try again.

  • Matt Harrison has published an excellent e-book Guide to: Learning Python Decorators.
  • I now have a theory about why most explanations of decorators (mine included) fail, and some ideas about how better to structure an introduction to decorators.

There is an old saying to the effect that “Every stick has two ends, one by which it may be picked up, and one by which it may not.” I believe that most explanations of decorators fail because they pick…

View original post 1,460 more words

Categories: Uncategorized