Skip to content

Instantly share code, notes, and snippets.

@papaeye
papaeye / mactex-setup.sh
Created May 16, 2015 06:59
Update MacTeX and setup Japanese environment
#!/bin/bash
# http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Mac#p3c663c9
tlmgr update --self --all
# http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Mac#i9febc9b
mkdir -p /usr/local/texlive/texmf-local/fonts/opentype/hiragino
@papaeye
papaeye / mactex-uninstaller.sh
Created May 16, 2015 06:51
Generate MacTeX uninstall script
#!/bin/bash
# https://tug.org/mactex/uninstalling.html
echo "# Uninstall TeX"
echo "rm -rf /usr/local/texlive"
echo "# Uninstall GUI Applications"
echo "rm -rf /Applications/TeX"
@papaeye
papaeye / migemo-tests.el
Created December 20, 2014 11:29
Tests for migemo.el
;;; migemo-tests.el --- Tests for migemo.el -*- lexical-binding: t; -*-
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@papaeye
papaeye / howm
Created December 5, 2014 15:34
MELPA recipe for howm
(howm :url "https://anonscm.debian.org/git/collab-maint/howm.git"
:fetcher git
:branch "upstream"
:files ("*.el" (:exclude "bcomp.el")))
@papaeye
papaeye / skk
Created October 19, 2014 06:21
MELPA recipe for DDSKK to GNU Emacs
(skk
:url ":pserver:guest:[email protected]:/circus/cvsroot"
:module "skk/main"
:fetcher cvs
:files ("ccc.el" "cdb.el" "context-skk.el" "queue-m.el" "skk*.el"
(:exclude "skk-xemacs.el")))
from itertools import repeat
class KuhnMunkres(object):
def __init__(self, weights):
self.weights = weights
self.rows = rows = len(weights)
self.cols = cols = len(weights[0])
self.X = range(rows)
from functools import partial
from itertools import product
STARRED = 1
PRIMED = 2
def kuhn_munkres(costs):
C, rows, cols, rotated = _step0(costs)
diff --git a/data/config/keymap.conf b/data/config/keymap.conf
index 63d9712..38effe5 100644
--- a/data/config/keymap.conf
+++ b/data/config/keymap.conf
@@ -43,6 +43,8 @@ InputChars group::hex::0x20-0x7e
CompConversion alt::hex::0x20||shift::hex::0x20
+StickyKey ;
+
@papaeye
papaeye / gist:5867372
Created June 26, 2013 13:30
brew doctor and brew --config
$ brew doctor
Warning: Your file-system on / appears to be CaSe SeNsItIvE.
Homebrew is less tested with that - don't worry but please report issues.
Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build
correctly if you install in /usr/local. Sorry!
$ brew --config
HOMEBREW_VERSION: 0.9.4
@papaeye
papaeye / gist:5867354
Created June 26, 2013 13:28
log of `pip install lxml`
Downloading/unpacking lxml
Running setup.py egg_info for package lxml
/opt/homebrew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.2.1.
Building without Cython.
Using build configuration of libxslt 1.1.26
warning: no previously-included files found matching '*.py'
warning: no files found matching '*.txt' under directory 'src/lxml/tests'