I noticed that someone mentioned pyweek in passing in an obscure comment on an obscure posting today that resulted in the single-highest number of hits from a single "news" posting about pyweek for a 24-hour period.
If we could only get the challenge mentioned as an article :)
You want me to pull some strings over at www.arcadecontrols.com and get them to post it on the front page? I've been buddies with Saint & all those guys for years now.
That is a few chars shorter, being only 94 chars long, the above is 107 :)
BTW, we are at 70 now, woohoo! still a quite a bit off from last time though...
from socket import*;s=socket();s.connect(("pyweek.org",80));s.send("GET /5/entries/ HTTP/1.0\n\n");x=""
while True:
try:i=s.recv(9);x+=[s.gettimeout(),i][bool(i)]
except:True=0
False=sum([not True for a in x.split("<dt")[0:-1]])
print False or True
By illume on 2007/08/16 08:41:
import urllib; print len(urllib.urlopen("http://www.pyweek.org/5/entries/").read().split('clear: right')) -1By richard on 2007/08/16 10:08:
You dag :)I noticed that someone mentioned pyweek in passing in an obscure comment on an obscure posting today that resulted in the single-highest number of hits from a single "news" posting about pyweek for a 24-hour period.
If we could only get the challenge mentioned as an article :)
By illume on 2007/08/17 01:01:
Getting it on the front page of python.org would be nice :)By Cthulhu32 on 2007/08/17 14:08:
You want me to pull some strings over at www.arcadecontrols.com and get them to post it on the front page? I've been buddies with Saint & all those guys for years now.By RB[0] on 2007/08/24 00:50:
import urllib;print urllib.urlopen("http://pyweek.org/5/entries").read().count("clear: right")That is a few chars shorter, being only 94 chars long, the above is 107 :)
By RB[0] on 2007/08/24 00:51:
import urllib;print urllib.urlopen("http://pyweek.org/5/entries").read().count("clear: right")That is a few chars shorter, being only 94 chars long, the above is 107 :)
BTW, we are at 70 now, woohoo! still a quite a bit off from last time though...
By RB[0] on 2007/08/24 00:52:
oops, sorry about double(oh, triple now) posting, my browser is acting funny again :/By neko on 2007/08/24 04:01:
78 characters.from urllib import*;urlopen("http://pyweek.org/5/entries").read().count("By neko on 2007/08/24 04:02:
Sorry. It cut me off because I used the < character.from urllib import*;urlopen("http://pyweek.org/5/entries").read().count("<dt")By neko on 2007/08/24 05:15:
Don't ask.from socket import*;s=socket();s.connect(("pyweek.org",80));s.send("GET /5/entries/ HTTP/1.0\n\n");x="" while True: try:i=s.recv(9);x+=[s.gettimeout(),i][bool(i)] except:True=0 False=sum([not True for a in x.split("<dt")[0:-1]]) print False or TrueBy richard on 2007/08/24 06:53:
Haven't you people got warmup games to write? :)By illume on 2007/08/24 08:30:
hahaha. 51 characters.By RB[0] on 2007/08/24 13:10:
Richard: The warm-up is officially over ;) and I didn't make anything, all I have time for right now are cute one-liners ;)illume: but that isn't python ...
neko: nice :)
By neko on 2007/08/24 13:16:
A variation of illume's 50 charactersBy Tee on 2007/08/25 01:06:
34 characters.I'm such a cheater. :)
(or, its 70 character python alternative:
from urllib import*;urlopen("http://xrl.us/5pyw").read().count("<dt"))By Neppord on 2007/08/26 22:04:
57... lalalaaaimport os;os.system("wget -qO- xrl.us/5pyw|grep -c \<dt")
let us all cheat!
By fydo on 2007/08/27 01:08:
Haha Tee :)By RB[0] on 2007/08/27 01:31:
Neppord, does that work for windows XP, or is it a linux call only(maybe I should test that...)By RB[0] on 2007/08/27 01:39:
Err, it doesn't work, I guess good ol' python code is the only solution ;)By neko on 2007/08/27 02:30:
By Tee on 2007/08/27 16:57:
neko: Bah. You can always run it in the interpreter directly. :)By Neppord on 2007/08/27 18:27:
If the user is smart enuf this would work eval(raw_input()) 17 charsBy Neppord on 2007/08/27 18:29:
sorry wrong commands :Pexec(raw_input())
still 17 though