do-collect.el:
do-collect-with-gc.el:
| import matplotlib | |
| matplotlib.use('Agg') | |
| from matplotlib import pyplot | |
| import numpy | |
| from flask import Flask, send_file | |
| from cStringIO import StringIO | |
| app = Flask(__name__) |
| import numpy | |
| from matplotlib import pyplot | |
| from matplotlib.colors import ListedColormap | |
| def genemesh(x0, x1, y0, y1, **kwds): | |
| return numpy.meshgrid( | |
| numpy.linspace(x0, x1, **kwds), | |
| numpy.linspace(y0, y1, **kwds), | |
| ) |
| import XMonad | |
| import qualified XMonad.StackSet as W | |
| main :: IO () | |
| main = xmonad defaultConfig | |
| { manageHook = composeAll | |
| [ className =? "XTerm" --> doFloatAbsRect 0 0 600 300 ] | |
| } | |
| doFloatAbsRect :: Rational -> Rational -> Rational -> Rational -> ManageHook |
| % [[[cog | |
| % import cog | |
| % from matplotlib.colors import cnames, hex2color | |
| % cog.outl('\n'.join( | |
| % r'\definecolor{mpl%s}{rgb}{%s}' % (n, '%s,%s,%s'% hex2color(cnames[n])) | |
| % for n in sorted(cnames))) | |
| % ]]] | |
| \definecolor{mplaliceblue}{rgb}{0.941176470588,0.972549019608,1.0} | |
| \definecolor{mplantiquewhite}{rgb}{0.980392156863,0.921568627451,0.843137254902} | |
| \definecolor{mplaqua}{rgb}{0.0,1.0,1.0} |
| (defadvice ido-completing-read | |
| (around ido-completing-read-with-anything | |
| (prompt choices &optional predicate require-match initial-input hist def) | |
| activate) | |
| "An advice to use `ido-completing-read' even if `anything' is installed. | |
| As `anything-read-string-mode' overrides `completing-read', this advice | |
| deactivate/activate before/after the execution of `ido-completing-read'." | |
| (let ((arsm anything-read-string-mode) | |
| (inhibit-quit t) |
| from matplotlib import pyplot, ticker | |
| import numpy | |
| pyplot.clf() | |
| ax = pyplot.axes() | |
| for axis in [ax.get_xaxis(), ax.get_yaxis()]: | |
| axis.set_major_locator(ticker.MaxNLocator(nbins=4, steps=[1, 2, 5, 10])) | |
| x = numpy.linspace(0, 11) | |
| ax.plot(x, numpy.sin(x) * 0.1 + 0.01) |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--action', '-a', action='append', nargs="+") | |
| parser.add_argument('--begin', '-b', action='append') | |
| parser.add_argument('--files', '-f', nargs="*") | |
| print parser.parse_args() |
| (require 'e2wm) | |
| (require 'e2wm-vcs) | |
| ;;; My commands | |
| (defun e2wm:my-toggle-sub (&optional move-buffer) | |
| "Toggle on/off of e2wm sub window. | |
| See also: http://d.hatena.ne.jp/kiwanami/20100528/1275038929 | |
| If the universal prefix argument is given, the current buffer |
| ;;;### (autoloads (image-bookmark-jump bmkext-bmenu-delicious bmkext-bmenu-refresh-delicious | |
| ;;;;;; bmkext-bmenu-list-only-firefox-bookmarks bmkext-export-addressbook | |
| ;;;;;; bmkext-addressbook-send-to-marked bmkext-addressbook-set-mail-buffer-and-cc | |
| ;;;;;; bmkext-addressbook-set-mail-buffer bmkext-bmenu-toggle-marks | |
| ;;;;;; bmkext-bmenu-hide-unmarked bmkext-bmenu-hide-marked bmkext-bmenu-regexp-mark | |
| ;;;;;; bmkext-bmenu-unmark-all-2 bmkext-bmenu-unmark-all bmkext-bmenu-unmark-all-non-deletion-flags | |
| ;;;;;; bmkext-bmenu-unmark-all-deletion-flags bmkext-bmenu-mark-all-bookmarks | |
| ;;;;;; bmkext-bmenu-show-all-bookmarks bmkext-bmenu-list-only-last-org-bookmarks | |
| ;;;;;; bmkext-bmenu-list-only-woman-man-bookmarks bmkext-bmenu-list-only-gnus-bookmarks |