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
# -*- 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
#!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
#!/bin/sh | |
set -e | |
export TARGET_ARCH=arm | |
export SRCROOT=/usr/home/ensekitt/src/freebsd-pi | |
export MAKEOBJDIRPREFIX=/usr/home/ensekitt/src/obj | |
export KERNCONF=RPI-B | |
KERNEL_BIN=`realpath $MAKEOBJDIRPREFIX`/arm.arm/`realpath $SRCROOT`/sys/$KERNCONF/kernel.bin | |
make -C $SRCROOT kernel-toolchain |
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
#include <Wire.h> //I2C Arduino Library | |
int i,j; | |
void setup(){ | |
//Initialize Serial and I2C communications | |
Serial.begin(38400); | |
Wire.begin(); | |
j = 0; | |
Serial.println("init"); | |
} |
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
/*** | |
Plot to Data (EnsekiTT) | |
x: exit | |
mouse_click + 0~9: plot + class(1~9) | |
output: data.csv | |
***/ | |
int temp_key; | |
PrintWriter writer; |
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
/// PWM Decoder /// | |
/// auther: EnsekiTT /// | |
/// PWMを発生させてpulseInでHIGHの時間を計測する。 | |
/// writeMicroseconds()で0~3000μsを10μsずつ調査する。 | |
/// pulseIn()でHIGH時間を各値について100回ずつ測り、平均を算出する。 | |
/// Serial出力: 入力値, デコード値の平均, 入力値-デコード値の平均 | |
#include <Servo.h> | |
int servo_pin = 8; |
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
<?php | |
$aim_n = 1; | |
$aim_e = 1; | |
$gps_n = $_GET[n]; | |
$gps_e = $_GET[e]; | |
$fp = fopen("position.log", 'a'); | |
fprintf($fp, $gps_n . ',' . $gps_e . "\n"); | |
fclose($fp); | |
echo ($aim_n - $gps_n) . ',' . ($aim_e-$gps_e); | |
?> |
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> |
OlderNewer