From kumar3180 at gmail.com Thu Apr 4 16:43:57 2013 From: kumar3180 at gmail.com (Raakesh kumar) Date: Thu, 4 Apr 2013 20:13:57 +0530 Subject: [Ncr-Python.in] OpenId/oAuth with Django Message-ID: Hi All, In my Django project i have to implement "Login through Google/Facebook" functionality. After searching a lot i found many things on OpenId and oAuth but it was very confusing to me. Though I am familiar with oAuth protocol, i couldn't find any helpful link on how to implement this functionality using that also in Django. If you have any experience on this, please share with me. Thanks -- Regards RAKESH KUMAR http://raakeshkumar.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gora at mimirtech.com Thu Apr 4 16:57:02 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Thu, 4 Apr 2013 20:27:02 +0530 Subject: [Ncr-Python.in] [ilugd] OpenId/oAuth with Django In-Reply-To: References: Message-ID: On 4 April 2013 20:13, Raakesh kumar wrote: > Hi All, > In my Django project i have to implement "Login through Google/Facebook" > functionality. After searching a lot i found many things on OpenId and > oAuth but it was very confusing to me. Though I am familiar with oAuth > protocol, i couldn't find any helpful link on how to implement this > functionality using that also in Django. > If you have any experience on this, please share with me. 1. You should use Oauth2. Facebook exclusively uses that, and Google has deprecated Oauth 1.0 2. There are several options. Perhaps the easiest is the django-social-auth application: - https://github.com/omab/django-social-auth - http://django-social-auth.readthedocs.org/en/latest/ Regards, Gora From kumar3180 at gmail.com Fri Apr 5 08:14:23 2013 From: kumar3180 at gmail.com (Raakesh kumar) Date: Fri, 5 Apr 2013 11:44:23 +0530 Subject: [Ncr-Python.in] [ilugd] OpenId/oAuth with Django In-Reply-To: References: Message-ID: Ok thanks will try it. On Thu, Apr 4, 2013 at 8:27 PM, Gora Mohanty wrote: > On 4 April 2013 20:13, Raakesh kumar wrote: > > Hi All, > > In my Django project i have to implement "Login through Google/Facebook" > > functionality. After searching a lot i found many things on OpenId and > > oAuth but it was very confusing to me. Though I am familiar with oAuth > > protocol, i couldn't find any helpful link on how to implement this > > functionality using that also in Django. > > If you have any experience on this, please share with me. > > 1. You should use Oauth2. Facebook exclusively uses that, and > Google has deprecated Oauth 1.0 > 2. There are several options. Perhaps the easiest is the django-social-auth > application: > - https://github.com/omab/django-social-auth > - http://django-social-auth.readthedocs.org/en/latest/ > > Regards, > Gora > _______________________________________________ > http://mail.python.org/mailman/listinfo/ncr-python.in > Mailing list guidelines : > http://python.org.in/wiki/NcrPython/MailingListGuidelines > -- Regards RAKESH KUMAR http://raakeshkumar.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hrdspl at gmail.com Sat Apr 20 21:01:25 2013 From: hrdspl at gmail.com (hiharry danny) Date: Sun, 21 Apr 2013 00:31:25 +0530 Subject: [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON Message-ID: I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the installation folder there is a folder named Tcl(Tool Command Language) which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The default gui standard of python is through Tkinter module and when this module is used the calls are made to the Tcl embedded interpreter to execute the code. So, is it for this reason Tcl is embedded in python or for anything else ? If i haven't installed tcl separately, what are the ways to access Tcl interpreter other than using ELmer and Using Tkinter module ,Tcl interpreter can be invoked using Tkinter.Tcl(). Can wish or telsh be for such ? import Tkinter a = Tkinter.Tcl() result = a.eval(' puts "hello, world" ') TclError: can not find channel named "stdout" But still it doesn't work, giving error why ? And one more thing when i type dir('Tkinter') or any other module name to display it's contents , why does it always show the same thing every time which is as follows ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__str__', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] -------------- next part -------------- An HTML attachment was scrubbed... URL: From gora at mimirtech.com Sat Apr 20 21:22:04 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 21 Apr 2013 00:52:04 +0530 Subject: [Ncr-Python.in] [BangPypers] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: On 21 April 2013 00:31, hiharry danny wrote: > I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the > installation folder there is a folder named Tcl(Tool Command Language) > which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The > default gui standard of python is through Tkinter module and when this > module is used the calls are made to the Tcl embedded interpreter to > execute the code. > So, is it for this reason Tcl is embedded in python or for anything else ? > If i haven't installed tcl separately, what are the ways to access Tcl > interpreter other than using ELmer and Using Tkinter module ,Tcl > interpreter can be invoked using Tkinter.Tcl(). > Can wish or telsh be for such ? Not sure what you are asking here. > import Tkinter > a = Tkinter.Tcl() > result = a.eval(' puts "hello, world" ') > TclError: can not find channel named "stdout" > But still it doesn't work, giving error why ? This works just fine for me on Linux with Python 2.7. Python 2.5 is quite old, and I would suspect some issue with your Python vs. Tk installation. > And one more thing when i type dir('Tkinter') or any other module name to > display it's contents , why does it always show the same thing every time > which is as follows [...] What you want is dir(Tkinter). Please note the absence of single quotes. What you are getting now is the dictionary for string, since that's you asked for. Regards, Gora From fatboyslimchandra at gmail.com Sun Apr 21 13:24:01 2013 From: fatboyslimchandra at gmail.com (saurabh chandra) Date: Sun, 21 Apr 2013 16:54:01 +0530 Subject: [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON Message-ID: I am trying to develop an algorithm for a combinatorial optimization. The problem consists of a graph network with nodes and connected arcs. In this algorithm I have to choose an optimal combination of nodes out of all the nodes in the graph. The successive nodes are selected as entries in the list using a random search technique. Successive nodes share a precedence relationship. In each iteration of the algorithm I generate a combination of a subset of nodes chosen randomly from the whole node-set, as a list. In the same loop I carry out a modification of the generated list and calculate the objective value associated with this . A particular generated list in any loop will give rise to a single modified list. Now I do not want same list to be generated again and again, so I maintain a super-list of generated lists and check the membership of each new list in this super-list. I restart the loop if same list appears again in the algorithm. As I already said the original list gets modified within an iteration. The problem is that although I append the super-list with the original list before modification, as soon as I modify this original list the list added to the super-list also changes automatically. Thus the iteration goes on even if the same list is generated again and again. I have tried many things: appending a copy of the original list to the super-list (using this command L1 = L[:], so that the new list is stored at a different address, still the same stuff happends. Please help me out here. I did not produce my code here as its too complicated. I can if someone is ready to help... thanks and regards Saurabh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gora at mimirtech.com Sun Apr 21 19:38:47 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 21 Apr 2013 23:08:47 +0530 Subject: [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: On 21 April 2013 16:54, saurabh chandra wrote: > I am trying to develop an algorithm for a combinatorial optimization. The > problem consists of a graph network with nodes and connected arcs. In this > algorithm I have to choose an optimal combination of nodes out of all the > nodes in the graph. The successive nodes are selected as entries in the list > using a random search technique. Successive nodes share a precedence > relationship. This description is not very clear, at least to me. What is an "optimal combination" in this case? Why does it make sense to use a random search? > In each iteration of the algorithm I generate a combination of a subset of > nodes chosen randomly from the whole node-set, as a list. In the same loop I > carry out a modification of the generated list and calculate the objective > value associated with this . A particular generated list in any loop will > give rise to a single modified list. > > Now I do not want same list to be generated again and again, so I maintain a > super-list of generated lists and check the membership of each new list in > this super-list. I restart the loop if same list appears again in the > algorithm. As I already said the original list gets modified within an > iteration. The problem is that although I append the super-list with the > original list before modification, as soon as I modify this original list > the list added to the super-list also changes automatically. Thus the > iteration goes on even if the same list is generated again and again. [...] Perhaps your best bet would be to show us some code, and describe which parts are not working as you expect them to. You might want to use pastebin.com for that. See if you can distil your code down to a small example that demonstrates the issue that you are facing. Regards, Gora From kumar3180 at gmail.com Mon Apr 22 14:05:38 2013 From: kumar3180 at gmail.com (Raakesh kumar) Date: Mon, 22 Apr 2013 17:35:38 +0530 Subject: [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: On Sun, Apr 21, 2013 at 4:54 PM, saurabh chandra < fatboyslimchandra at gmail.com> wrote: > I am trying to develop an algorithm for a combinatorial optimization. The > problem consists of a graph network with nodes and connected arcs. In this > algorithm I have to choose an optimal combination of nodes out of all the > nodes in the graph. The successive nodes are selected as entries in the > list using a random search technique. Successive nodes share a precedence > relationship. > [...] > In each iteration of the algorithm I generate a combination of a subset of > nodes chosen randomly from the whole node-set, as a list. In the same loop > I carry out a modification of the generated list and calculate the > objective value associated with this . A particular generated list in any > loop will give rise to a single modified list. > [/...] Why random? What kind of modifications you are actually doing? Is it like sorting them based open their objective values or something like that? Is it a sort of tree/graph traversal algorithm based upon some criteria? [...] > > Now I do not want same list to be generated again and again, so I maintain > a super-list of generated lists and check the membership of each new list > in this super-list. I restart the loop if same list appears again in the > algorithm. As I already said the original list gets modified within an > iteration. The problem is that although I append the super-list with the > original list before modification, as soon as I modify this original list > the list added to the super-list also changes automatically. Thus the > iteration goes on even if the same list is generated again and again. > [/...] I am thinking rather than maintaining a super-list(i couldn't understand what is this) why didn't you loop through the entire list of nodes to remove the ambiguity? And if you are modifying the first node also then probably you would require to maintain a separate list containing the first nodes of all the lists. I don't know whether i would be able to help but after looking at the scenario i think your code with some description should help me understand my questions and possible solutions. Thanks -- Regards RAKESH KUMAR http://raakeshkumar.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hrdspl at gmail.com Wed Apr 24 23:44:49 2013 From: hrdspl at gmail.com (hiharry danny) Date: Thu, 25 Apr 2013 03:14:49 +0530 Subject: [Ncr-Python.in] [BangPypers] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the > installation folder there is a folder named Tcl(Tool Command Language) > which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The > default gui standard of python is through Tkinter module and when this > module is used the calls are made to the Tcl embedded interpreter to > execute the code. > So, is it for this reason Tcl is embedded in python or for anything else ? > If i haven't installed tcl separately, what are the ways to access Tcl > interpreter other than using ELmer and Using Tkinter module ,Tcl > interpreter can be invoked using Tkinter.Tcl(). > Can wish or telsh be for such ? Not sure what you are asking here. Well i am asking here that Tcl that is present in the installation folder of Python ,that is embedded with python because python access Tcl when called using Tkinter module. is it for this reason Tcl is embedded with python ? also if i want to access Tcl interpreter, embedded in python, how to do that in a standalone manner ? On Sun, Apr 21, 2013 at 12:52 AM, Gora Mohanty wrote: > On 21 April 2013 00:31, hiharry danny wrote: > > I have Python 2.5.4 installed on windows platform ..(win xp) ...and in > the > > installation folder there is a folder named Tcl(Tool Command Language) > > which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 > .The > > default gui standard of python is through Tkinter module and when this > > module is used the calls are made to the Tcl embedded interpreter to > > execute the code. > > So, is it for this reason Tcl is embedded in python or for anything else > ? > > If i haven't installed tcl separately, what are the ways to access Tcl > > interpreter other than using ELmer and Using Tkinter module ,Tcl > > interpreter can be invoked using Tkinter.Tcl(). > > Can wish or telsh be for such ? > > Not sure what you are asking here. > > > import Tkinter > > a = Tkinter.Tcl() > > result = a.eval(' puts "hello, world" ') > > > TclError: can not find channel named "stdout" > > But still it doesn't work, giving error why ? > > This works just fine for me on Linux with Python 2.7. > Python 2.5 is quite old, and I would suspect some > issue with your Python vs. Tk installation. > > > And one more thing when i type dir('Tkinter') or any other module name to > > display it's contents , why does it always show the same thing every time > > which is as follows > [...] > > What you want is dir(Tkinter). Please note the absence of > single quotes. What you are getting now is the dictionary > for string, since that's you asked for. > > Regards, > Gora > _______________________________________________ > http://mail.python.org/mailman/listinfo/ncr-python.in > Mailing list guidelines : > http://python.org.in/wiki/NcrPython/MailingListGuidelines > -------------- next part -------------- An HTML attachment was scrubbed... URL: