This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class throttle(object): | |
| """ | |
| Decorator that prevents a function from being called more than once every | |
| time period. | |
| To create a function that cannot be called more than once a minute: | |
| @throttle(minutes=1) | |
| def my_fun(): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: http://weblogs.asp.net/jgalloway/archive/2006/11/20/top-10-dos-batch-tips-yes-dos-batch.aspx | |
| echo %%~1 = %~1 | |
| echo %%~f1 = %~f1 | |
| echo %%~d1 = %~d1 | |
| echo %%~p1 = %~p1 | |
| echo %%~n1 = %~n1 | |
| echo %%~x1 = %~x1 | |
| echo %%~s1 = %~s1 | |
| echo %%~a1 = %~a1 |
NewerOlder