Technology, programming, python, work and interesting things

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]

STARLIMS Utilities

STARLIMS Utilities is a set of tools designed to increase the productivity of STARLIMS developers.
STARLIMS Utilities Screenshot

Features:

  • STARLIMS Import Conflicts Viewer - shows the differences between items in a STARLIMS package and the ones in a STARLISM dictionary (items compare status, item differences); it's meant to be used before importing a package into a dictionary. It allows the developers to take decisions on which items to import and which to manually merge
  • STARLIMS Dictionary Differences Viewer - shows the differences between items in 2 STARLIMS dictionaries; it's meant to be used when synchronizing dictionaries to identify what needs to be updated ...

SEE - STARLIMS Enhanced Editor

SEE (STARLIMS Enhanced Editor) is an advanced code editor for SSL (STARLIMS Scripting Language). SEE can be used only with STARLIMS version 9.
STARLIMS Enhanced Editor Screenshot

Features:

  • Auto completion for in-line SQL statements - column names in SELECT clauses (Screenshot)
  • Auto completion for in-line SQL statements - table names in FROM clauses (Screenshot)
  • Auto completion for in-line SQL statements - column names in WHERE clauses (Screenshot)
  • Auto completion for user-defined function names (Screenshot)
  • Auto completion for local variables and parameters (Screenshot)
  • Auto completion for STARLIMS keywords (Screenshot)
  • Auto completion for STARLIMS functions (Screenshot)
  • Syntax highlighting
  • Smart indenting

Download SEE

After you download the zip archive you ...

Daily archives

Copyright © 2008-2011 Mihail Ovidiu Pascut