tag:blogger.com,1999:blog-5236867476487043111.post6586650934818400424..comments2024-03-11T07:55:47.104-04:00Comments on Corey Goldberg: Python Timer Class - Context Manager for Timing Code BlocksCorey Goldberghttp://www.blogger.com/profile/06219872951977664560noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5236867476487043111.post-69697712806588198502012-07-31T13:39:59.744-04:002012-07-31T13:39:59.744-04:00@chrisk
you need to install `requests` (a *great*...@chrisk<br /><br />you need to install `requests` (a *great* module).<br /><br />see: http://docs.python-requests.org/<br /><br />or `pip install requests`<br /><br />-CoreyCorey Goldberghttps://www.blogger.com/profile/06219872951977664560noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-17415146649894643962012-07-31T12:48:02.773-04:002012-07-31T12:48:02.773-04:00I am receiving an error in attempting to import th...I am receiving an error in attempting to import the requests module. Is this pseudo-code? From where are your importing this?Chris Knoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-4279205339159935392012-06-20T14:30:32.518-04:002012-06-20T14:30:32.518-04:00https://github.com/jsocol/pystatsd/blob/master/sta...https://github.com/jsocol/pystatsd/blob/master/statsd/client.py - similar idea also usable as a decorator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-16179199833907004562012-06-18T22:51:54.607-04:002012-06-18T22:51:54.607-04:00Thanks!
Very useful timer class, a good use of co...Thanks!<br /><br />Very useful timer class, a good use of context managermkazhttps://www.blogger.com/profile/10448928337591300852noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-65800240298354918452012-06-18T10:09:24.149-04:002012-06-18T10:09:24.149-04:00I did something similar. I also added an option to...I did something similar. I also added an option to append the timings to a CSV, since I was trying to optimize a time sensitive piece of code.<br /><br />I wasn't aware of default_timer. TIL. :-)<br /><br /><a href="https://gist.github.com/2948552" rel="nofollow">https://gist.github.com/2948552</a>Will McGuganhttps://www.blogger.com/profile/14552374744569764596noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-4293061075055408392012-06-18T05:27:33.206-04:002012-06-18T05:27:33.206-04:00Very cool tool! timeit can be a pain to use, becau...Very cool tool! timeit can be a pain to use, because of it string statement argument. <br /><br />This seems much more natural to use. Kudos!viajar-uruguayhttps://www.blogger.com/profile/16562292498334847432noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-15120182917150044092012-06-18T05:21:11.054-04:002012-06-18T05:21:11.054-04:00I've been using decorators for this. I'll...I've been using decorators for this. I'll have to see how hard it would be to add context manager syntax support in profilehooks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-36436214833219197332012-06-17T10:43:09.484-04:002012-06-17T10:43:09.484-04:00I have something very similar in my utils, but you...I have something very similar in my utils, but you can also give it a name: https://gist.github.com/2944722Eli Benderskyhttps://www.blogger.com/profile/17473579534980300934noreply@blogger.com