- It's recommended to set an empty value to the following kernel config option:
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" >>> Auto-cleaning packages...
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
# -*- coding: utf-8 -*- | |
import re | |
import urllib2 | |
import numpy | |
def batch_gradient_descent(X, y, initial_theta, alpha, num_iters=1500): | |
u"""データセットに対してバッチ勾配降下法を実行し | |
目的関数を最小化するθを求める。 |
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
# -*- coding: utf-8 -*- | |
from math import ceil | |
class PageOffset(object): | |
def __init__(self, start=1, size=0): | |
if start < 0: | |
raise AttributeError | |
if size < 0: |
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
# -*- coding: utf-8 -*- | |
""" | |
凝縮型クラスタリング(agglomerative clustering) | |
重心法(centroid method) | |
""" | |
def sim(x1, x2): | |
if x1 == x2: | |
return float('inf') | |
return 1.0/(max(x1, x2) - min(x1, x2)) |
2分法を使うために、KeyWdTの書き換え、及びnextTokenのletterの場合のプログラムの書き換え。
KeyWdTの書き換え。
static struct keyWd KeyWdT[] = {
{"if", If},
{"do", Do},
{"end", End},
{"odd", Odd},
- dfaalloc
- dfasyntax
- dfacomp
- dfaparse L1963
- lex L1253
- regexp
- dfassbuild
- dfa_supported
- dfaoptimize
- dfaanalyze
MySQLのregexpはマルチバイト対応していない。
そこで、文字の16進数の文字列に変換してregexpを使う。
UTF-8前提が前提だと、pythonでカタカナを16進数に変換。
>>> '|'.join([''.join([hex(ord(cc)) for cc in c.encode('utf-8')]).replace('0x', '').upper() for c in u"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボァィゥェォヵヶッャュョヮ"])
'E382A2|E382A4|E382A6|E382A8|E382AA|E382AB|E382AD|E382AF|E382B1|E382B3|E382B5|E382B7|E382B9|E382BB|E382BD|E382BF|E38381|E38384|E38386|E38388|E3838A|E3838B|E3838C|E3838D|E3838E|E3838F|E38392|E38395|E38398|E3839B|E3839E|E3839F|E383A0|E383A1|E383A2|E383A4|E383A6|E383A8|E383A9|E383AA|E383AB|E383AC|E383AD|E383AF|E383B0|E383B1|E383B2|E383B3|E383B4|E382AC|E382AE|E382B0|E382B2|E382B4|E382B6|E382B8|E382BA|E382BC|E382BE|E38380|E38382|E38385|E38387|E38389|E38390|E38393|E38396|E38399|E3839C|E382A1|E382A3|E382A5|E382A7|E382A9|E383B5|E383B6|E38383|E383A3|E383A5|E383A7|E383AE
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
" ----- | |
" Dein | |
" ----- | |
if &compatible | |
set nocompatible | |
endif | |
set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim | |
if dein#load_state(expand('~/.vim/dein')) | |
call dein#begin(expand('~/.vim/dein')) |