Other articles

  1. Τρικ στρογγυλοποίησης ακεραίων στην Python

    Στην Python για στρογγυλοποίηση αριθμών υπάρχει η build-in function round().
    Η round(number,[ndigits]) παίρνει ένα αριθμό και επιστρέφει ένα float αριθμό στρογγυλοποιημένο. Αν δώσουμε το όρισμα ndigits (αριθμός παλι) η στρογγυλοποίηση γίνεται στα ndigits ψηφία. Πχ.
    >>> round(1.123456,3)
    1.123
    

    Ο αριθμός στρογγυλοποιήθηκε στα 3 δεκαδικά ψηφία … read more

    comments

  2. PyMOTW and stuff

    Ίσως το καλύτερο blog σχετικά με Python.

    Ο Doug Hellmann έχει στο blog του μια κατηγορία που την ονομάζει PyMOTW - δηλαδή Python module of the week.

    Κάθε εβδομάδα έχει ένα αναλυτικότατο, απόλυτα κατανοητό με πολλά παραδείγματα αφιέρωμα σε ένα module της Python.

    Είναι must read. Ακόμα και σε modules που …

    read more

    comments

  3. Python list comprehensions nasty behavior

    Sat 19 April 2008 | tags: python

    Python’s list comprehension syntax is amazingly concise and easy to use and understand. It make Python even more beautiful than it already is.

    However, i came upon some weird behavior today that caused a strange bug in my application.

    The common way to use a list comprehension is with …

    read more

    comments

  4. sorting using keys in python.

    Tue 26 February 2008 | tags: python

    I’ve used comparator functions while sorting in python quite often. I had a complex object today that i had to sort on using non-standard comparator functions.

    My object was a dictionary that contained a list of 2 dictionaries that in turn containd lists of objects. I wanted to sort …

    read more

    comments

  5. Resolver is a great idea.

    I was reading about Resolver quite often, mostly on planet python. I had made a mental memo to try it out for my self sometime but always seemed to be delaying it. I tried it out yesterday i was really impressed by the concept. 

    With Resolver you have a spreadsheet …

    read more

    comments

  6. IBAN validating code

    Wed 06 February 2008 | tags: python

    Recently i needed to validate some IBAN numbers (International Bank Account Number). I quick search revealed the wikipedia article on the subject.

    Though i had initially hacked up a Greek-only IBAN validator i though it might be of use to other people as well and modified it to validate  every …

    read more

    comments

  7. Captcha widgets in Django

    This blog was getting stormed by comment spam so i decided to use some captcha protection. I chose pycaptcha for this and had to integrate it nicely with Django. I wanted to make it an easy widget that does it’s own validation and does not require view code for …

    read more

    comments

Page 1 / 2 »

blogroll

social