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 numpy as np | |
from sympy import * | |
# az el roll [rad] | |
degang = [0,45,0] | |
[az, el, roll] = np.array(degang)*np.pi/180 | |
q_az = np.array([0,0,np.sin(az/2),np.cos(az/2)]) | |
q_el = np.array([0,np.sin(el/2),0,np.cos(el/2)]) |
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
n = 10 | |
x = Variable(x_test[n:n+1]) | |
v = model.predictor(x) | |
plt.imshow(x_test[n:n+1].reshape((28,28)), cmap = cm.Greys_r) | |
print(np.argmax(v.data)) |
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 matplotlib.pyplot as plt | |
## 定数達 | |
# ギャンブラーの所持金 | |
S = list(range(1, 100)) | |
# 状態価値関数 | |
V = 101*[0.0] | |
# 勝利条件 | |
V[100] = 1.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
dirlist = Dir::entries(".") | |
# ファイルをフィルタリングする | |
targets = dirlist.grep(/(.+)\.wav/) | |
# 変更ルールを決める | |
renametable = Array(targets.length) | |
targets.each_with_index do |name, i| | |
print i%19+1, "," | |
print i/19+1, "\n" |
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 | |
import numpy as np | |
import pandas as pd | |
import chainer | |
import chainer.functions as F | |
import chainer.links as L | |
from chainer import optimizers | |
from chainer import serializers |
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 | |
# In[26]: | |
get_ipython().magic(u'matplotlib inline') | |
import tensorflow as tf | |
import numpy as np | |
import matplotlib.pyplot as plt |
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
#!BPY | |
import bpy | |
def clear_all(): | |
for item in bpy.context.scene.objects: | |
bpy.context.scene.objects.unlink(item) | |
for item in bpy.data.objects: | |
bpy.data.objects.remove(item) | |
for item in bpy.data.meshes: | |
bpy.data.meshes.remove(item) |
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 -*- | |
### | |
# $ python setup.py py2exe | |
### | |
from distutils.core import setup | |
import sys | |
import os | |
import matplotlib |
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 numpy as np | |
import scipy as sp | |
import scipy.linalg as spla | |
import matplotlib.pyplot as plt | |
def pca(data, base_num = 1): | |
n, d = data.shape #n:データ数 d:次元数 n>dじゃないとダメです。 | |
data_mean = data.mean(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
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE eagle SYSTEM "eagle.dtd"> | |
<eagle version="6.5.0"> | |
<drawing> | |
<settings> | |
<setting alwaysvectorfont="no"/> | |
<setting verticaltext="up"/> | |
</settings> | |
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/> | |
<layers> |