This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
python:python [2014/01/22 15:51] dblume |
python:python [2022/06/15 07:49] (current) dblume Mention flask gunicorn nginx |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Python ====== | + | ====== |
| Man, there' | Man, there' | ||
| Line 7: | Line 7: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| - | * Of course, there' | + | * Of course, there' |
| * There' | * There' | ||
| - | * Look into the microframework [[http:// | + | * Look into the microframework [[http:// |
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * A Power Point deck by Alex Martelli describing [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| Would be nice to create a binary search in text files in Python. | Would be nice to create a binary search in text files in Python. | ||
| Line 244: | Line 249: | ||
| finally: | finally: | ||
| fcntl.flock(f, | fcntl.flock(f, | ||
| + | </ | ||
| + | |||
| + | ====== Various Approaches to threaded URL Requests ====== | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * Or, use the doc's [[https:// | ||
| + | * And, as mentioned in Parallelism in One Line, [[https:// | ||
| + | |||
| + | ====== Fibonacci Generator with Itertools ====== | ||
| + | |||
| + | <code python> | ||
| + | import itertools | ||
| + | |||
| + | def fib(n): | ||
| + | """ | ||
| + | a, b = 0, 1 | ||
| + | while True: | ||
| + | yield a | ||
| + | b = a + b | ||
| + | yield b | ||
| + | a = a + b | ||
| + | |||
| + | if __name__ == ' | ||
| + | for x in itertools.islice(fib(), | ||
| + | print x | ||
| + | |||
| + | # for i in range( 5 ): | ||
| + | # print i, fib( i ) | ||
| </ | </ | ||