Rosetta Code:Village Pump/Sort popular pump pages: Difference between revisions

Undo revision 214646 by 188.143.232.14 (talk) - Why was that removed?
(added source code)
(Undo revision 214646 by 188.143.232.14 (talk) - Why was that removed?)
 
(7 intermediate revisions by 6 users not shown)
Line 1:
{{Vptopic
|topic=Sort popular pump pages
|summary=A Python implementation of pump sorting code.
}}
I was reading [[http://blog.rosettacode.org/?p=184]].
I'm programming the Village Pump sorter right now.
Line 12 ⟶ 16:
I will post source code here. --[[User:Guga360|Guga360]] 22:37, 24 April 2009 (UTC)
 
<codelang python>import urllib
import urllib2
import time
Line 55 ⟶ 59:
edits.append(Page(i,GetTimeStamp(x)))
 
from operator import attrgetter
edits = sorted(edits, key=lambda x: x.attrgetter('time'), reverse=True)
 
final = """This is the new place for Rosetta Code community activity. To start a new "thread", just append a "/" to the end of the URL of this page and give your thread a short title. On the new page, give a more detailed description of the topic as a heading, and write away. Also, link to the new topic on this page. Ex: <nowiki>{{vp|New topic}}</nowiki>.
Line 81 ⟶ 86:
token = get_token()
 
edit("Village_Pump:Home",getsortedvp(), token)</codelang>
 
--[[User:Guga360|Guga360]] 22:41, 24 April 2009 (UTC)
==What happened?==
It seems like we never did anything with this code. What's up with that? --[[User:Mwn3d|Mwn3d]] 12:55, 26 June 2009 (UTC)