Showing posts with label appengine. Show all posts
Showing posts with label appengine. Show all posts

Saturday, June 25, 2011

appengine unittesting trick

I was looking for the ideal way to run all my unittests on my appengine projects.
Let's define what is ideal:
  • http://project.appspot.com/test to run all unittests
  • create unittest directly in file it is testing/no need to create unittest file for each file
Solution:
  • install gaeunit
  • create or move unittest classes directly in file that it is testing
  • create /test/project_unittest.py
  • import all file containing unittest class in project_unittest.py
What's great with python is that unittest.main() run all unittests that are in the scope which means you simply have to import them and no need to create multiple test files if unittests classes are directly integrated in each files.

Thursday, April 7, 2011

Letters order isn't important for our mind: a simple appengine service to play with this idea

I got several time an email about cool visual illusions and enjoyed a lot the one on the fact that our mind doesn't care about letter order, the only important thing is that the first and last letter be in the right place (refer as a Cambridge study). You might have already seen this:

Olny srmat poelpe can raed tihs. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt! if you can raed tihs psas it on!!

I decided to create a service to play with the idea on google appengine.
You can try it now with your own text:

Saturday, October 9, 2010

PDF watermarking service using pdfrw on google appengine

If you are looking to watermark a pdf, you can use this simple appengine service:
This service use pdfrw (a PDF file manipulation library written by Paul Gauvin) and reportlab. pdfrw is much faster then pypdf for watermarking.