- wxMaximaの公式サイトからパッケージを配布しているので付属のREADMEに従ってインストールする。jsMathフォントは再起動しないと使えなかった。
- wxMaximaのRatinaディスプレイ対応版をダウンロードし、インストールしたものと置き換える。GitHubのissueの最後の方でバイナリを配布している人がいるのでおこぼれにあずかる。
- STIXという数式用のフォントをsourceforgeからダウンロードする。展開後、
STIXv1.1.0/Fonts/STIXGeneral
以下にあるフォントを全てインストールする。wxMaximaのPreferenceにあるMath Font(出力フォント)にSTIX-General Regular
を設定する。 - 入力用のフォントは何でもいいけど等幅がいいと思う。
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
最近傍法による単純な数字認識のサンプルプログラム | |
''' | |
import numpy as np | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
パーセプトロンの学習規則に従い誤り訂正法を用いて | |
パーセプトロンの収束定理を検証するサンプルプログラム。 | |
線形分離可能な2つのクラスについて固定増分法で線形識別関数の重みを求める。 | |
''' | |
import numpy as np |
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
var data = NSMutableData() | |
var buffer = [UInt8](count: 4096, repeatedValue: 0) | |
request.HTTPBodyStream?.open() | |
while request.HTTPBodyStream!.hasBytesAvailable { | |
let length = request.HTTPBodyStream!.read(&buffer, maxLength: 4096) | |
if length == 0 { | |
break | |
} else { | |
data.appendBytes(&buffer, length: length) | |
} |
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 Foundation | |
struct Logger { | |
enum Level: Int { | |
case verbose = 0, debug, info, warning, error, none | |
var tag: String { | |
switch self { | |
case .verbose: return "VERVOSE" | |
case .debug: return "DEBUG" |