Technology, programming, python, work and interesting things

The Python Paradox

I recommend this very interesting read from Paul Graham regarding non-mainstream programming languages.

Quote:

It's a lot of work to learn a new programming language. And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.

Which makes them exactly the kind of programmers companies should want to hire. Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they'll ...

Django generic views cache-like behavior

In certain cases the Django generic views will behave like they are caching data. They are doing that for the queryset argument and not for extra_context which is known to be cached. This will happen if you send to the generic view a queryset filtered with a callable.

Let's take as an example a blogging application. In blog.models we have:

class PublishedManager(Manager): 
def get_query_set(self):
queryset = super(PublishedManager, self).get_query_set()
return queryset.filter(pub_date__lte=datetime.now)

class Entry(models.Model):
...
pub_date = models.DateTimeField()
published = PublishedManager()
...

In blog.urls:

info_dict = {'queryset': Entry.published.all()} 

entry_list = url( regex = '^$',
view ...

Using Photographs to Enhance Videos of a Static Scene

Great video editing technology that automatically enhances your videos using high quality photos of a scene. What it does:

  • Super-resolution - enhances the resolution of the video
  • High dynamic range - increases the dynamic range
  • Enhanced exposure - enhances the exposure
  • Object touchup - alters the objects in the scene
  • Object removal - removes unwanted objects from the scene - coolest feature IMO, go to 6:00 in the video to see it in action


The only limitation for now is that it can handle only static scenes.

[Using Photographs to Enhance Videos of a Static Scene via reddit]

Copyright © 2008-2011 Mihail Ovidiu Pascut