Python Documentation

Python Documentation

Release 0.1.0 Joon Ro

March 28, 2014

Contents

1 Cython

3

1.1 Passing a cdef function to another cdef function as an argument . . . . . . . . . . . . . . . . . . 3

2 date

5

2.1 Get week number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 matplotlib

7

3.1 dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.2 LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.3 Subplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.4 Save to PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Numpy

9

4.1 Find indices of duplicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 Profiling

11

5.1 Get the profile stats with cProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.2 RunSnakeRun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.3 KCachegrind with pyprof2calltree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 PyTables

13

6.1 Automatically close already open hdf5 files before opening . . . . . . . . . . . . . . . . . . . . . . 13

6.2 Generate a hdf5 file from a recarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

6.3 Compress and Compacting PyTables files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

6.4 Modifying value in-place . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Web Crawling

15

7.1 Mechanize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

8 Indices and tables

17

i

ii

Contents:

Python Documentation, Release 0.1.0

Contents

1

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download