Join us at IRC!
Ideas are far more powerful than guns.
Friday, May 25, 2012
Navigation
Members Online
Total Online: 36
Web Spiders: 13
Guests Online: 31
Members Online: 5

Registered Members: 70217
Newest Member: HyperFang8
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

Timed 4 python optimising

jjbutler88
Colemak User



Posts: 590
Location:
Joined: 22.04.07
Rank:
Guru
Posted on 18-05-08 17:33
Ok, so far the challenges have been pretty lax on time allowed to return the answer. Im now on timed 4, and have written a python scblockedript which (i believe) returns the correct answer. Im getting errors when I submit it though, telling me its either wrong or too late. So I checked my answers and they seem ok, the only thing it can be is the time.

I imported python's time module and took 2 readings, one just before my http request and one just after. Got about 4.5 seconds back. I do have an ugly for..if..elif statement in the middle, but even with this commented out i'm still at 3.5.

Does anyone know any good techniques for optimizing python code? Dont really want to do it in C, im getting on well with python.

Cheers


http://soundcloud.com/altimeter
Author

RE: Timed 4 python optimising

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 18-05-08 18:51
Might be traffic, always best to do the timed challenges when the fewest people are on. Then again I did mine in curl (haven't done 4 though :\ ) But try again when fewer people are on.


http://www.totse.com
Author

RE: Timed 4 python optimising

jjbutler88
Colemak User



Posts: 590
Location:
Joined: 22.04.07
Rank:
Guru
Posted on 18-05-08 20:06
Yeah, im on wireless as well, im gonna try plugging straight into my router with my laptop. Mind you that has a much slower proc, will this influence things much?


http://soundcloud.com/altimeter
Author

RE: Timed 4 python optimising

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 18-05-08 20:14
Anything that will slow your connection down will effect the time you take. You could try it on a free PHP host (donno if they CURL installed though).


http://www.totse.com
Author

RE: Timed 4 python optimising

SwartMumba
Member



Posts: 292
Location: TX <--- I'm here‭‮
Joined: 18.09.07
Rank:
Uber Elite
Posted on 19-05-08 03:09
I don't mind taking a look at your scblockedript and seeing if I can help.



Kids, get educated: http://www.python.com
http://www.WarstBamum.org
Author

RE: Timed 4 python optimising

jjbutler88
Colemak User



Posts: 590
Location:
Joined: 22.04.07
Rank:
Guru
Posted on 19-05-08 10:35
PM sent swartmumba


http://soundcloud.com/altimeter
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.