Skip to content

Instantly share code, notes, and snippets.

View s-yoshiki's full-sized avatar
🎯
Focusing

Yoshiki Shinagawa s-yoshiki

🎯
Focusing
View GitHub Profile
@s-yoshiki
s-yoshiki / index.html
Last active September 4, 2015 08:53
html5のvideoタグからcanvasに画像を出力して遊ぶ【JavaScript】 ref: http://qiita.com/sy_sft_/items/fc428f341a8c321b4095
<video id='world' width="256" height="256" autoplay></video>
<canvas id="canvas"></canvas>
<button onClick="start()">start</button>
<button onClick="stop()">stop</button>
<button id="draw">set canvas</button>
@s-yoshiki
s-yoshiki / file0.txt
Last active September 9, 2015 09:45
homebrewを用いてMacにOpenCVを導入 ref: http://qiita.com/sy_sft_/items/535b2d2a2b488f1af151
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license
@s-yoshiki
s-yoshiki / TAN.cpp
Created October 16, 2015 02:07
report tan
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<iostream>
#define N 15
/*
struct point{
int x;
int y;
};
#include<iostream>
//#include<windows.h>
#include<math.h>
#include"glut.h"
#define SCALE 360.0
GLdouble ex = 4.0, ey = 5.0, ez = 6.0; /* 視点の位置 */
GLdouble tx = 0.5, ty = 0.5, tz = 0.5; /* 目標点の位置 */
GLdouble ax = 0.0, ay = 1.0; /* 対象の回転軸 */
GLdouble angle = 0.0; /* 回転角 */
#ローパス関数
def low_path(xx):
sample_rate = 100.0
nsamples = 400
t = arange(nsamples) / sample_rate
#t = framerate
x = xx
nyq_rate = sample_rate / 2.0 #ナイキスト周波数
width = 5.0/nyq_rate #正規化
@s-yoshiki
s-yoshiki / yoshiki.zsh-theme
Created January 12, 2016 11:35
.oh-my-zsh追加テーマ
# oh-my-zeshの自作テーマ「yoshiki」
# テーマ"ys.zsh-theme"をもとに拡張した
# Jan 2016
# Machine name.
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
}
# Directory info.
@s-yoshiki
s-yoshiki / main.cpp
Created September 27, 2015 14:07
FlycaptureSDK and OpenCV
#include "stdafx.h"
#include <pgrflycapture.h>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
int _tmain(int argc, _TCHAR* argv[])
{
@s-yoshiki
s-yoshiki / *.bf
Created February 25, 2018 14:38
Brainf★ck
+++++++++[>++++++++++++<-]>+.<
>++++++++.<
>-------.<
>+.<
>++++++.<
+++++++[>---------------<-]>--.<
+++++++++[>+++++++++++<-]>.<
>++++++++.<
>-------.<
>+.<
@s-yoshiki
s-yoshiki / app.js
Last active March 14, 2018 13:33
images upload using Lambda
"use strict";
var AWS = require("aws-sdk");
var DOC = require("dynamodb-doc");
var s3 = new AWS.S3();
exports.handler = (event, context, callback) => {
@s-yoshiki
s-yoshiki / main.py
Created May 6, 2018 23:28
ディレクトリ内の画像を一覧表示
# coding:utf-8
import os
images_path = "./src/"
def getHtmlHeader():
return """
<!DOCTYPE html>
<html>
<header>