From nodarakis at gmail.com Wed Dec 1 19:51:22 2010 From: nodarakis at gmail.com (Nikos Nodarakis) Date: Wed, 1 Dec 2010 20:51:22 +0200 Subject: [TasPython] =?iso-8859-7?b?M+cg8/Xt3O305/Pn?= Message-ID: ????????? ?? ?????, ???????? ???? ???????????? ??????????? ???? ??? ???? ??? ????????? ??? ?????? ??? ??? ???? ??? ???????? ? ????????? ??? ?? ??????????????? ???? ???? ??? ????????. ?????? ???? ???? ??????? ???????? ?????? ?????? ???? ??????? ???? ??? ??????? ???????? ?? ????? ? ?????????. ?? ??????? ?? ???? ??? ??????????. -- It's not that I don' t trust people,it's that I don' t trust the devil inside them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nodarakis at gmail.com Tue Dec 7 20:18:33 2010 From: nodarakis at gmail.com (Nikos Nodarakis) Date: Tue, 7 Dec 2010 21:18:33 +0200 Subject: [TasPython] =?iso-8859-7?b?M+cg8/Xt3O305/PnIHRhc3B5dGhvbg==?= Message-ID: ????????? ?? ?????, ? ????? ?????? ????????? ?? ??????????????? (?????????!!!!) ???? ??? ?????? 9 ?????????? ??? ??? 19:00 ???? ??????? B3 ??? ???????? ????????? ?/? ??? ????????????. ?? ???????????? ??????????? ?????????? ????????????? ??' ???? ?? ????? ???? ????!!!?? ???????????? ??? ?? ?????? ????? ?? ????: Graphs made simple - Networkx - ??????????? ???????? ??? ?????????? ?????????? ??? networkx, ???? python module ??? ?? ??????????, ??? ???????????, ?? ?????? ??? ??? ?????????? ??????, ????? ??? ??? live demonstration ??? ?? ???? ???? ???????? ?? ???????? ???? ???. Decorators in Python - ????????? ???????? ??? ?????????? ?????????? ??? ?? decorators ???? Python. ?? ????? ??? ???????????, ?? ????????????? ?????????? ??? ?? ?????? ?? ?????????? ???? ???? ?? ??????? ??? ?????????????? ???? Python ????? ?????????? -- It's not that I don' t trust people,it's that I don' t trust the devil inside them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nodarakis at gmail.com Wed Dec 15 10:25:52 2010 From: nodarakis at gmail.com (Nikos Nodarakis) Date: Wed, 15 Dec 2010 11:25:52 +0200 Subject: [TasPython] =?iso-8859-7?b?wfDv9OXr3fPs4fThIDPn8iD25fTp7d7yIPP1?= =?iso-8859-7?b?7dzt9Ofz5/I=?= Message-ID: ? ????? ?????? ????????? ?? ??? ???????????????? ?? ?????? ??????????? ????? ???? ???? ????? ??????????! ????????????????? ??? ????????????: ??? ??? ?? networkx ???? python module ??? ?? ??????????, ??? ???????????, ?? ?????? ??? ??? ?????????? ?????? ????? ??? ??? ?????????? ?????????? ??? ?? python decorators. ??? ???? ????? ? ????? ? ?????? ???? ??? ???????? ?????? ?????? ?????????? ???????? ??? ?? ?????? ?? ??????? ??? ?? ?????? ??? ??????, ??? ???????? ???????? ??? ??????????? ??? networkx ??? ??? ?????? ???? ???? ?????? ??????? ?? ?????????????, ?? ???????????? ??? ?? ????????? ?? ??????????? ??? ??????. ??? ?????, ?????? ??? ??? ???? ???? ?????????? live demostration ??? ????? ??????? ??? ????? ? ?????? ????????????? ?? ??????? ?????? ???? ?????? ??? ??? ????? ??? ??? twitter ??? ??????????????? ??????? ??????? ???????? ??? ?????? ??? ???????? ?? ???????? ???????????? ????????????. ??? ????????, ? ????? (badguy) ????? ??? ?????????? ?????????? ??? ?? decorators ???? Python. ????????????? ? ?????? ??????????? ????, ??? ?????? ?? ????? ?????????? ?????? decorators ?? ??? ?????????, ?? ????? ??????????? ??????? ?? ?????? ??????? ???? ??? ?? ?????? ?? ?????????? ???? ???? ?? ??? ???????????? ???? ?????????????? ??? ??? ?? ??? ???????????. ??? ?????????? ??? ???????????? ???????? ?? ??? ?????? ???? ????????? ??????? ??? site! -- It's not that I don' t trust people,it's that I don' t trust the devil inside them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From themhs at gmail.com Mon Dec 20 19:00:24 2010 From: themhs at gmail.com (Themistoklis Savvidis) Date: Mon, 20 Dec 2010 20:00:24 +0200 Subject: [TasPython] decorators + Lots of __init__ args Message-ID: ???????, ??? ??????? ??? ?????????? ?????????? ??????? ?? ???? decorators, ???????? ?? ???????? ?? ?? ????? ??? ???? ??? ??? ???????? ? ???????? (??????) ??? ???????? ????: ?: ???? ??? ??? ??? ????? User. ???? ??????????? ??? User ???? ?? ?????? ?? ??????????? 20 ?????????? (username, name, surname, age, email, phone_num ??? ?,?? ???? ???????? ?? ???????????) ???? ???? ?????????????. ??? ?????? ?? ?? ?????? ????; ?) ?? ???? ? constructor ??? User 20 ???????? ?? ?? ????? ?? ?????o???? ???-??? ??? ?????????? ????????????; (hint: ????? ???????? ??? ?? ?????? ???????? ????? ??????? ???????????? ??? ????????? ??? (a) ????????) ?) ?? ???? ??? ?????? **kwargs ??? ?? ???? ?????? '?????'; ?? '?????' ??? ??????? ?? ????? ????????? ?? ?? self.__dict__, ??????? ??? ??? ???? ?? ????? ??????? ???????? ??? ????????????: def __init__(self, **kwargs): for (key, item) in kwargs.items(): self.__dict__[key] = item ?) ??????? ??????? ??? ??????? ??????; A: O ???????? ??? ???????? ?? ????? ???? ?? ????????????? ??? update() ??? ???????, ??? ?????? ??? ?????? ????????: def __init__(self, **kwargs): self.__dict__.update(kwargs) ???? ????, ???? ??? ???????, ????? ????? ???????? ????? ???? Theo? ????? ???? ?? ?? ??? ????????? ??? kwargs - ?? ? ????? ? ???? ??? ?????????? 2 ???????? ?????????????. So, ??? ??? restricted ???? ????? ? ????: class User: init_properties = ['username', 'name', 'surname'] @autoargs(init_properties) def __init__(self, **kwargs): self.__dict_.update(kwargs) ???? ? init_properties ????? ???? ??? ????????? ???? kwargs ?? ????????? ??? instance variables ??? ? decorator autoargs ????? ????? ??? ????? ?? ??????? ???????, '????????' ??? ?? '????????' args. ??? ????? ? ???? ???, ?????? ??? ????????? editor ??? ????????, ?????? 'i' (sic) ??? ?????? ??? ???????? decorator: def autoargs(arg_list): def decorator(func): def wrapper(self, **kwargs): [setattr(self,k,v) for (k,v) in kwargs.items() if k in arg_list] func(self, **kwargs) return wrapper return decorator ???? ????? o constructor ???????: @autoargs(init_properties) def __init__(self, **kwargs): pass ???' ??' ????, ?????? ?????? ??? ??????? ????? ??? ?????? (????????), ????? ? ?' ????? ??? ???????? ??? ???????. ??? ???????? "nice, ??? ?? ????? ??? ?? ????? ?? django". ???? ???????????, ??? ?? ?? django ??????????? ??? ???? ?????? ???? ????? ?? ????? decorators. ??? ??? ??????????? ???? ?? decorators ??? ????? ? ??????? ??? ?? ???? ????????, ???????? ?? ????? ???: http://stackoverflow.com/questions/1389180/python-automatically-initialize-instance-variables -- Themis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpessas at gmail.com Mon Dec 20 19:38:54 2010 From: mpessas at gmail.com (Apostolos Bessas) Date: Mon, 20 Dec 2010 20:38:54 +0200 Subject: [TasPython] decorators + Lots of __init__ args In-Reply-To: References: Message-ID: ??????? ??? ? ???? ??????? ???? (??? ??????????????? ?????? ????? ??? ??? ?? Qt, ?? ??????? ????): ?? ??????????? ??? ?????????? ? contructor (initializer actually ??? python) ??? ????? "ready". ?? ?????????? ??????????? ???? getters/setters ??? ????????? ??? ????????????. ???? ???? ???? ?? ??????????? ?????????? ???????? (???????? ?????? ???? ?? ?????) ?? ??????????? ?????????? ?? ready ??? ?????? ?? ?????????????? (?? save() to db). ????? ???? (disclaimer: code not tested, not even for correct syntax / could use cleanup): class User(object): def __init__(self): self.__ready = False self.__args = (name, username, password, ) def name(self): return self.__name def set_name(self, name): self.__name = name def __check_if_ready(self): if all(self.__args): self.__ready = True def save(self): if not self.__ready: self.__check_if_ready() if not self.__ready: raise NotReadyError("Not ready yet") self.__save() ?? ??????? ????, ?????? ?? ??? ??? ?? ???????? ??? ?? guide ??? Trolltech (Nokia ?????) ??? API design. ??? ????, ?? ??????? ??? ?? ?? ?????? dicts ????? ??? ???????? (??? ??? ?? ??? ???????????? ????? ?????????? (? ??????? ???????? ?? C++ ??? ????? ???????? ? Qt, ??? ? ????? ???, ???? ? ????? ??????? ?? ????? ???????????)). ????????? PS http://stackoverflow.com/questions/895296/how-can-you-tell-if-a-person-is-a-programmer/895359#895359 2010/12/20 Themistoklis Savvidis : > ???????, > > ??? ??????? ??? ?????????? ?????????? ??????? ?? ???? decorators, ???????? > ?? > ???????? ?? ?? ????? ??? ???? ??? ??? ???????? ? ???????? (??????) ??? > ???????? > ????: > > ?: ???? ??? ??? ??? ????? User. ???? ??????????? ??? User ???? ?? ?????? ?? > ?? ??????????? 20 ?????????? (username, name, surname, age, email, phone_num > ??? > ?? ?,?? ???? ???????? ?? ???????????) ???? ???? ?????????????. ??? ?????? ?? > ?? > ?? ?????? ????; > > ?? ?) ?? ???? ? constructor ??? User 20 ???????? ?? ?? ????? ?? ?????o???? > ????? ???-??? ??? ?????????? ????????????; (hint: ????? ???????? ??? ?? > ?????? > ????? ???????? ????? ??????? ???????????? ??? ????????? ??? (a) ????????) > > ?? ?) ?? ???? ??? ?????? **kwargs ??? ?? ???? ?????? '?????'; > ????? ?? '?????' ??? ??????? ?? ????? ????????? ?? ?? self.__dict__, ??????? > ????? ??? ??? ???? ?? ????? ??????? ???????? ??? ????????????: > > ????? def __init__(self, **kwargs): > ????? ??? for (key, item) in kwargs.items(): > ??? ? ? ? ? ? self.__dict__[key] = item > > ?? ?) ??????? ??????? ??? ??????? ??????; > > A: O ???????? ??? ???????? ?? ????? ???? ?? ????????????? ??? update() ??? > ?? ???????, ??? ?????? ??? ?????? ????????: > > ??? def __init__(self, **kwargs): > ??? ??? self.__dict__.update(kwargs) > > ?? ???? ????, ???? ??? ???????, ????? ????? ???????? ????? ???? Theo? ????? > ???? > ?? ?? ?? ??? ????????? ??? kwargs - ?? ? ????? ? ???? ??? ?????????? 2 > ???????? > ?? ?????????????. So, ??? ??? restricted ???? ????? ? ????: > > ?? class User: > > ?????? init_properties = ['username', 'name', 'surname'] > > ?????? @autoargs(init_properties) > ?????? def __init__(self, **kwargs): > ?????????? self.__dict_.update(kwargs) > > ?? ???? ? init_properties ????? ???? ??? ????????? ???? kwargs ?? ????????? > ??? > ?? instance variables ??? ? decorator autoargs ????? ????? ??? ????? ?? > ??????? > ?? ???????, '????????' ??? ?? '????????' args. > > ??? ??? ????? ? ???? ???, ?????? ??? ????????? editor ??? ????????, ?????? > 'i' > ??? (sic) ??? ?????? ??? ???????? decorator: > > ??? def autoargs(arg_list): > ??? ??? def decorator(func): > ??? ??? ??? def wrapper(self, **kwargs): > ??? ??? ??? ??? [setattr(self,k,v) for (k,v) in kwargs.items() if k in > arg_list] > ??? ??? ??? ??? func(self, **kwargs) > ??? ??? ??? return wrapper > ??? ??? return decorator > > ??? ???? ????? o constructor ???????: > > ????? @autoargs(init_properties) > ?????? def __init__(self, **kwargs): > ?????????? pass > > ??? ???' ??' ????, ?????? ?????? ??? ??????? ????? ??? ?????? (????????), > ??? ????? ? ?' ????? ??? ???????? ??? ???????. ??? ???????? "nice, ??? ?? > ????? > ??? ??? ?? ????? ?? django". ???? ???????????, ??? ?? ?? django ??????????? > ??? ???? > ??? ?????? ???? ????? ?? ????? decorators. > > ??? ??? ??? ??????????? ???? ?? decorators ??? ????? ? ??????? ??? ?? ???? > ????????, > ??? ???????? ?? ????? ???: > > > http://stackoverflow.com/questions/1389180/python-automatically-initialize-instance-variables > > -- > Themis > > _______________________________________________ > TasPython mailing list > http://taspython.eu/ > http://mail.python.org/mailman/listinfo/taspython > > From mpessas at gmail.com Mon Dec 20 19:40:48 2010 From: mpessas at gmail.com (Apostolos Bessas) Date: Mon, 20 Dec 2010 20:40:48 +0200 Subject: [TasPython] decorators + Lots of __init__ args In-Reply-To: References: Message-ID: ?? check_if_ready ???? ??? ?? ????? ?????? ?? ??????? ?? decorator (?? ????????? modification), ??? ?? ?????????????? ??? ???? ??? ??????????? (code reuse baby!). ????????? 2010/12/20 Apostolos Bessas : > ??????? ??? ? ???? ??????? ???? (??? ??????????????? ?????? ????? ??? > ??? ?? Qt, ?? ??????? ????): > ?? ??????????? ??? ?????????? ? contructor (initializer actually ??? > python) ??? ????? "ready". ?? ?????????? ??????????? ???? > getters/setters ??? ????????? ??? ????????????. ???? ???? ???? ?? > ??????????? ?????????? ???????? (???????? ?????? ???? ?? ?????) ?? > ??????????? ?????????? ?? ready ??? ?????? ?? ?????????????? (?? > save() to db). > > ????? ???? (disclaimer: code not tested, not even for correct syntax / > could use cleanup): > > class User(object): > ? ?def __init__(self): > ? ? ? ?self.__ready = False > ? ? ? ?self.__args = (name, username, password, ) > > ? ?def name(self): > ? ? ? ?return self.__name > > ? ?def set_name(self, name): > ? ? ? ?self.__name = name > > ? ?def __check_if_ready(self): > ? ? ? ?if all(self.__args): > ? ? ? ? ? ?self.__ready = True > > ? ?def save(self): > ? ? ? ?if not self.__ready: > ? ? ? ? ? ?self.__check_if_ready() > ? ? ? ? ? ?if not self.__ready: > ? ? ? ? ? ? ? ?raise NotReadyError("Not ready yet") > ? ? ? ?self.__save() > > ?? ??????? ????, ?????? ?? ??? ??? ?? ???????? ??? ?? guide ??? > Trolltech (Nokia ?????) ??? API design. ??? ????, ?? ??????? ??? ?? ?? > ?????? dicts ????? ??? ???????? (??? ??? ?? ??? ???????????? ????? > ?????????? (? ??????? ???????? ?? C++ ??? ????? ???????? ? Qt, ??? ? > ????? ???, ???? ? ????? ??????? ?? ????? ???????????)). > > ????????? > > PS http://stackoverflow.com/questions/895296/how-can-you-tell-if-a-person-is-a-programmer/895359#895359 > > 2010/12/20 Themistoklis Savvidis : >> ???????, >> >> ??? ??????? ??? ?????????? ?????????? ??????? ?? ???? decorators, ???????? >> ?? >> ???????? ?? ?? ????? ??? ???? ??? ??? ???????? ? ???????? (??????) ??? >> ???????? >> ????: >> >> ?: ???? ??? ??? ??? ????? User. ???? ??????????? ??? User ???? ?? ?????? ?? >> ?? ??????????? 20 ?????????? (username, name, surname, age, email, phone_num >> ??? >> ?? ?,?? ???? ???????? ?? ???????????) ???? ???? ?????????????. ??? ?????? ?? >> ?? >> ?? ?????? ????; >> >> ?? ?) ?? ???? ? constructor ??? User 20 ???????? ?? ?? ????? ?? ?????o???? >> ????? ???-??? ??? ?????????? ????????????; (hint: ????? ???????? ??? ?? >> ?????? >> ????? ???????? ????? ??????? ???????????? ??? ????????? ??? (a) ????????) >> >> ?? ?) ?? ???? ??? ?????? **kwargs ??? ?? ???? ?????? '?????'; >> ????? ?? '?????' ??? ??????? ?? ????? ????????? ?? ?? self.__dict__, ??????? >> ????? ??? ??? ???? ?? ????? ??????? ???????? ??? ????????????: >> >> ????? def __init__(self, **kwargs): >> ????? ??? for (key, item) in kwargs.items(): >> ??? ? ? ? ? ? self.__dict__[key] = item >> >> ?? ?) ??????? ??????? ??? ??????? ??????; >> >> A: O ???????? ??? ???????? ?? ????? ???? ?? ????????????? ??? update() ??? >> ?? ???????, ??? ?????? ??? ?????? ????????: >> >> ??? def __init__(self, **kwargs): >> ??? ??? self.__dict__.update(kwargs) >> >> ?? ???? ????, ???? ??? ???????, ????? ????? ???????? ????? ???? Theo? ????? >> ???? >> ?? ?? ?? ??? ????????? ??? kwargs - ?? ? ????? ? ???? ??? ?????????? 2 >> ???????? >> ?? ?????????????. So, ??? ??? restricted ???? ????? ? ????: >> >> ?? class User: >> >> ?????? init_properties = ['username', 'name', 'surname'] >> >> ?????? @autoargs(init_properties) >> ?????? def __init__(self, **kwargs): >> ?????????? self.__dict_.update(kwargs) >> >> ?? ???? ? init_properties ????? ???? ??? ????????? ???? kwargs ?? ????????? >> ??? >> ?? instance variables ??? ? decorator autoargs ????? ????? ??? ????? ?? >> ??????? >> ?? ???????, '????????' ??? ?? '????????' args. >> >> ??? ??? ????? ? ???? ???, ?????? ??? ????????? editor ??? ????????, ?????? >> 'i' >> ??? (sic) ??? ?????? ??? ???????? decorator: >> >> ??? def autoargs(arg_list): >> ??? ??? def decorator(func): >> ??? ??? ??? def wrapper(self, **kwargs): >> ??? ??? ??? ??? [setattr(self,k,v) for (k,v) in kwargs.items() if k in >> arg_list] >> ??? ??? ??? ??? func(self, **kwargs) >> ??? ??? ??? return wrapper >> ??? ??? return decorator >> >> ??? ???? ????? o constructor ???????: >> >> ????? @autoargs(init_properties) >> ?????? def __init__(self, **kwargs): >> ?????????? pass >> >> ??? ???' ??' ????, ?????? ?????? ??? ??????? ????? ??? ?????? (????????), >> ??? ????? ? ?' ????? ??? ???????? ??? ???????. ??? ???????? "nice, ??? ?? >> ????? >> ??? ??? ?? ????? ?? django". ???? ???????????, ??? ?? ?? django ??????????? >> ??? ???? >> ??? ?????? ???? ????? ?? ????? decorators. >> >> ??? ??? ??? ??????????? ???? ?? decorators ??? ????? ? ??????? ??? ?? ???? >> ????????, >> ??? ???????? ?? ????? ???: >> >> >> http://stackoverflow.com/questions/1389180/python-automatically-initialize-instance-variables >> >> -- >> Themis >> >> _______________________________________________ >> TasPython mailing list >> http://taspython.eu/ >> http://mail.python.org/mailman/listinfo/taspython >> >> > From mydimle at gmail.com Fri Dec 24 13:39:12 2010 From: mydimle at gmail.com (Dimitris Leventeas) Date: Fri, 24 Dec 2010 14:39:12 +0200 Subject: [TasPython] =?utf-8?b?RndkOiDOoM+Bz4zPg866zrvOt8+Dzrcgz4PPhc68?= =?utf-8?b?zrzOtc+Ezr/Ph86uz4Igz4PPhM6/IE9wZW5GZXN0IDIwMTE=?= Message-ID: <201012241439.12537.mydimle@gmail.com> ????? ??????? ??? ?????? ?????! ?????? ??? ????????? ?????????? ??? ?? OpenFest 2011. ?????? ?????? ????? ????? ??? ?? ?????????? ??? ???? ???? ???????. ?????? ?? ??????????? ??? ?????! ?. -- ???, ??? ?? ??? ??? ????????? ????. ?? ?? ?????? ?? ?????? ?? ?? ??????. -------------- next part -------------- An embedded message was scrubbed... From: openfest at teipir.gr Subject: =?iso-8859-7?Q?=D0=F1=FC=F3=EA=EB=E7=F3=E7_=F3=F5=EC=EC=E5=F4=EF=F7=DE?= =?iso-8859-7?Q?=F2_=F3=F4=EF_OpenFest_2011?= Date: Fri, 24 Dec 2010 14:48:51 +0200 (EET) Size: 56354 URL: