Follow us on Twitter!
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 19
Members Online: 4

Registered Members: 82824
Newest Member: devilslegion
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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 script 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


Author

RE: Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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?


Author

RE: Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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).


Author

RE: Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-05-08 03:09
I don't mind taking a look at your script and seeing if I can help.


Author

RE: Timed 4 python optimising


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-05-08 10:35
PM sent swartmumba