This file contains 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
import subprocess | |
def pkgconfig(*packages, **kw): | |
""" | |
Query pkg-config for library compile and linking options. Return configuration in distutils | |
Extension format. | |
Usage: | |
pkgconfig('opencv') |
This file contains 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
# modified numpy concatenate, vstack, hstack accepting scalars in the input tuple | |
def concatenate(tup, axis=0): | |
tup_arrays = [x for x in tup if isinstance(x, np.ndarray)] | |
shape = list(tup_arrays[0].shape) | |
shape[axis] = 1 | |
tup_ = [] | |
for x in tup: | |
if isinstance(x, (int, long, float)): |
This file contains 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
# xy offset xy | |
plt.annotate('...text...', object_to_annotate_coords, (0, -20), textcoords='offset points', color='k') |
This file contains 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
fig_manager = plt.get_current_fig_manager() | |
if hasattr(fig_manager, 'window'): | |
fig_manager.window.showMaximized() |
This file contains 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
import IPython | |
IPython.core.pylabtools.figsize(10,6) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
supported backends: ['pdf', 'wx', 'gtk3', 'gtk', 'ps', 'qtagg', 'tkagg', 'gtkcairo', 'mixed', 'template', 'gtk3cairo', 'svg', 'qt4agg', 'gtk3agg', 'emf', 'qt', 'cocoaagg', 'qt4', 'wxagg', 'agg', 'gtkagg', 'fltkagg', 'pgf', 'macosx', 'cairo', 'gdk'] | |
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed | |
import gobject._gobject | |
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size | |
from gtk import _gtk | |
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed | |
from gtk import _gtk | |
fish: Job 1, “python valid_matplotlib_backends.py ” terminated by signal SIGSEGV (Address boundary error) |
NewerOlder