仕事でgnuplotを使う必要になり,インストールしました.
osx + aquaterm出力での話です.
- AquaTermのインストール
でAquaTermをダウンロードしてインストールします.
brew install gnuplot --with-aquaterm
- gnuplotを起動
gnuplot
とすれば,
Terminal type set to 'aqua'
となり,aquatermでのプロットが可能になります.
英語の専門書をすらすら読めるようになりたい.
ただでさえ理解力が無いから,
英語の翻訳に時間をかけたくない・・・.
1級か準1級のどちらを受けるか現在悩んでいます.
問題を解くよりも,
勉強する時間の確保が難しいですね.
Processingの勉強とpythonの勉強を兼ねて,
以下の本を見ながら,
pythonモードでprocessingを操作しました.
Processingをはじめよう 第2版 (Make: PROJECTS)
おそらく実行時に,ネットに接続していないと機能しないと思います.
class Robot: yOffset = 0.0 def __init__(self, shape, tempX, tempY): self.botShape = shape self.xPos = tempX self.yPos = tempY self.angle = random(0, TWO_PI) def update(self): self.angle += 0.05 self.yOffset = sin(self.angle) * 20 def display(self): shape(self.botShape, self.xPos, self.yPos + self.yOffset)
from robot import Robot bots = [] num = 20 def setup(): size(720, 480) robotShape = loadShape("robot2.svg") for i in range(num): x = random(-40, width - 40); y = map(i, 0, num, -100, height - 200) bots.append(Robot(robotShape, x, y)) def draw(): background(0, 153, 204) for i in range(num): bots[i].update() bots[i].display()
時間があれば,以下の本で勉強したいですね.
[普及版]ジェネラティブ・アート―Processingによる実践ガイド
Nature of Code -Processingではじめる自然現象のシミュレーション-
Raspberry Pi3 Model Bが欲しいです.
Raspberry Pi 3 Model B V1.2 (日本製) 国内正規代理店品
強いて言えば,Raspberry Pi Mouse V2が欲しい.
物欲が止まりません.
仕事で使う必要があったので,
以下の本で勉強しました.
状況に応じてどの検定を使うべきか少し分かったので,
とても勉強になりました.
ただ分散分析に関しては正直まだ分かりません.
09. Typoglycemia
スペースで区切られた単語列に対して,各単語の先頭と末尾の文字は残し,それ以外の文字の順序をランダムに並び替えるプログラムを作成せよ.ただし,長さが4以下の単語は並び替えないこととする.適当な英語の文(例えば"I couldn't believe that I could actually understand what I was reading : the phenomenal power of the human mind .")を与え,その実行結果を確認せよ.
import random def wordShuffle(word): if len(word) <= 4: return word shuffleWord = list(word)[1:-1] random.shuffle(shuffleWord) return word[0] + ''.join(shuffleWord) + word[-1] def typoglycemia(str): wordList = [] for word in str.split(): wordList.append(wordShuffle(word)) return wordList str = "I couldn't believe that I could actually understand what I was reading : the phenomenal power of the human mind ." print(' '.join(typoglycemia(str)));
これまでの総まとめを感じた問題でした.
random.shuffleで簡単にランダムに並び替えられるので,
とても楽ですね.
2章もそのうち解こうと思います.