python:python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:python [2014/05/23 00:59] – [Python] dblume | python:python [2023/10/28 00:07] (current) – dblume | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Python ====== | + | ====== |
Man, there' | Man, there' | ||
Line 9: | Line 9: | ||
* Of course, there' | * Of course, there' | ||
* There' | * There' | ||
- | * Look into the microframework [[http:// | + | * Look into the microframework [[http:// |
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | * [[https:// | + | * [[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 247: | Line 250: | ||
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 ====== | ====== Fibonacci Generator with Itertools ====== | ||
Line 268: | Line 279: | ||
# for i in range( 5 ): | # for i in range( 5 ): | ||
# print i, fib( i ) | # print i, fib( i ) | ||
+ | </ | ||
+ | |||
+ | ====== Parse C++ Code with nm and graphviz' | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install graphviz | ||
+ | </ | ||
+ | |||
+ | <code python> | ||
+ | # Read `nm` output | ||
+ | output = subprocess.check_output([' | ||
+ | for line in output.split(' | ||
+ | if ' | ||
+ | |||
+ | # Make a .dot file | ||
+ | with open(filename + ' | ||
+ | file.write(' | ||
+ | for f, destinations in self.graph.items(): | ||
+ | for d in destinations: | ||
+ | file.write(f' | ||
+ | |||
+ | |||
+ | def create_png_image(filename): | ||
+ | with open(filename + ' | ||
+ | p1 = subprocess.run([' | ||
+ | |||
</ | </ | ||
python/python.1400831943.txt.gz · Last modified: 2023/04/12 20:44 (external edit)