Archive

Posts Tagged ‘Python’

Change subtitles filename to match videos filename – improved

September 1st, 2008 No comments

I wrote a new python script to do the job. This time it should work properly. There is just a little flow. But I’m going to explain the workaround. )
sdf
Read more…

Categories: Python, Tutorial Tags: ,

Templates for django-registration

November 2nd, 2007 2 comments

I’ve found this django application for user registration which is really good. Django registration is powered by James Bennett. In the new version example templates have been removed. According to the creator:

They were simply causing too much hassle from expectations that they’d work perfectly out-of-the-box for everyone, so I yanked them out. This shouldn’t affect anyone because you should be writing your own templates, but it’s worth calling attention to.

So let’s just see an example about how to write templates for django-registration.

Read more…

Django Snippets

October 26th, 2007 No comments

I’m learning how to use Django right now. I found this awesome site which is full of simple (and more advanced) snippets to use with Django framework. )
django <a rel=snippets” />
Click on the image to view the site.

Categories: News, Python, Web Tags: , , ,

Save your Firefox cache flv files (Macromedia Flash Video)

October 23rd, 2007 4 comments

Today we will see how to save your flv taken from your Firefox cache. Due to using some specific console commands this tutorial is useful only for a Unix-like system, not for Windows. I’m sorry P
Before starting let’s say there are tools, like Clive or Videodownload (firefox plugin), made for similar purpose but they work in a different way:

  • they works on specific sites only (like Youtube), and that’s a problem because some sites are not supported
  • If you have some bandwith limit issue, Clive and Videodownload force you to re-download the video

Especially the second point, to me, it’s a problem because I use an UMTS connection and it works using a limited bandwith per month and generally a flv file consumes some MBs.
Let’s see my way.
Read more…

Serialization in Python

October 7th, 2007 2 comments

We begin this tutorial quoting from Wikipedia:

In computer science, in the context of data storage and transmission, serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link in binary form. The series of bytes or the format can be used to re-create an object that is identical in its internal state to the original object (actually a clone).

This process of serializing an object is also called deflating or marshalling an object. The opposite operation, extracting a data structure from a series of bytes, is deserialization (which is also called inflating or unmarshalling).

So serialization is useful when we have to store a complex data structure. For example it could be useful if you have to store into a cookie users information. If we have an object “user” composed by username,password etc… we can serialize it and so we can use a single cookie.

Read more…