Codeception

Musings & ramblings of a Pythonista

Ubuntu Maverick Meerkat

I installed the new Ubuntu 10.10 Maverick Meerkat on my Laptop and on my Desktop at home. Now both systems doesn't have Windows in it. My family is now very comfortable with Ubuntu and they use the Ubuntu machine for working with OpenOffice, watching movies, playing games and for using Internet.

BTW, I really like the new Ubuntu font which gives Ubuntu a brandish look. I mean like ...

Read more...

Comments...


Borg Pattern

Singleton Design Patterns create all sorts of problems as you have exactly one instance for the singleton class throughout the program.

# Singleton implementation using new-style classes
class Singleton(object):
    def __new__(type):
        if not '_the_instance' in type.__dict__:
            type._the_instance = object.__new__(type)
        return type._the_instance

class Foo(Singleton):
    pass

>>> foo = Foo()
>>> bar = Foo()
>>> id(foo), id(bar)
(10049912, 10049912)

Usually programmers use Singleton Patterns as a global entry point ...

Read more...

Comments...


A commandline mapper

Python provides a builtin map function which applies a method over a list of entities. This function comes handy in a lot of situations as in

# find the square of all integers in a list
# Eg: 
#   input: [1, 2, 3, 4]
#   return: [1, 4, 9, 16]
map(lambda x: x*x, list_of_integers)

Similar functionality can be achieved in linux commandline using a combination of unix pipe | and xargs command. For ...

Read more...

Comments...


Hacking PlayStation 3 with Teensy 2.0

I've always been a proud and loyal owner of a Playstation 3 and still I consider it as the most powerful game console of this generation. But things were super-cool back on the days when Playstation 3 supported OtherOS by which you could boot and use Linux on your console. This was the very feature (other than GameOS which is why someone should buy a PS3 :-)) every PS3 owner ...

Read more...

Comments...


GitHub powered blogging

I have learned a big lesson from losing all the blog archives from my previous blog semk.in, that never ever host a blog without any backups. I didn't pay any attention to domain/hosting expiration date since I was busy working at that time. But finally everything was deleted in a matter of seconds. I never blamed the hosting provider for this. They kept mailing me all the ...

Read more...

Comments...


Tag Cloud:

Tux Paint Java Debian NoSQL Flask GUI Destructor Magic Tool Emacs Service Mode Internet BORG Tips QProgressDialog Android Mindmaps regex Packaging GitHub LG Optimus One Parallels Borg Pattern Computer Python Org-mode Lion Scalability RegexMate Raspberry Pi Books Jinja2 Ubuntu IDE Firefox Blogging Projects C stdeb Qt Gaming Cricinfo Voldemort urllib2 Riak Shell HyperGAE Debug Teensy Preforking App Engine Multiprocessing Socket xargs Singleton Playstation 3 StringIO Custom Firmware Scratch Variables Mac OSX PyQt Hacks Hardware GAESessions Unix API UI setuptools Linux Hypertable System Calls Garbage Collection Design Pattern Memory Management