Skip to content

Instantly share code, notes, and snippets.

View JotaroS's full-sized avatar
🎓

Jotaro JotaroS

🎓
View GitHub Profile
import cv2
import numpy as numpy
import sys
h = 512
w = 512
def nothing(x):
pass
cv2.namedWindow('lena')
@JotaroS
JotaroS / file0.txt
Last active November 23, 2016 06:57
Arduinoでいろいろ始めたい人が知っておいた方がいい、いろいろなこと ref: http://qiita.com/JotaroS/items/65d19e0e54a88c9d2be9
R = \frac{(V_{cc}-V_f)}{I_f}
@JotaroS
JotaroS / file0.txt
Last active February 9, 2016 06:56
Swiftによるアプリ開発〜Storyboardを用いた最もシンプルな画面遷移の超テンプレ ref: http://qiita.com/JotaroS/items/20ee03edfebe4e9bbf34
|---buttonA--2nd view
1st view----
|---buttonB--3rd view
@JotaroS
JotaroS / file0.txt
Last active November 13, 2017 09:56
Intel Edisonでスマートウォッチもどきを作ってみた話 ref: https://qiita.com/JotaroS/items/58a9a0b4e53709ce19b8
screen /dev/tty.usbserial 115200
@JotaroS
JotaroS / test.js
Created March 18, 2016 13:55
p5.js script
var sphere_r = 200;
var phi=0,theta=0;
function setup() {
var canvas = createCanvas(windowWidth, windowHeight,WEBGL);
canvas.parent("p5Canvas");
resizeCanvas(windowWidth, windowHeight);
basicMaterial(0,0,0);
setupSphereShell();
}
@JotaroS
JotaroS / ms_emotion.py
Last active July 10, 2018 21:22
Microsoft emotion recognition api python code
# Calling Emotion APIs is
# restricted to 20 transactions per minute
# and 30,000 transactions per month.
# 20 transactions per 60 seconds
# 1 transaction per 3 seconds
# python ms_emotion.py tani.jpg
import httplib
import urllib
@JotaroS
JotaroS / Makefile
Created September 3, 2016 11:40
Makefile for competitive programming
CC=g++
CFLAGS=-Wall
.SUFFIXES = .cpp
objs:=$(wildcard *.cpp)
targets:=$(objs:.cpp= )
.PHONY:all
all: $(targets)
.cpp:
$(CC) $(CFLAGS) -std=c++11 -o $@ $<
import math
pistr = '31415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989'
@JotaroS
JotaroS / epipolar.py
Created February 23, 2017 12:47
Pythonを用いたエピポーラ幾何のチュートリアル(バグ修正版)
#coding:utf-8
import cv2
import numpy as np
from matplotlib import pyplot as plt
img1 = cv2.imread('./left.jpg',0) #queryimage # left image
img2 = cv2.imread('./right.jpg',0) #trainimage # right image
sift = cv2.SIFT()
@JotaroS
JotaroS / Grab.cs
Created May 6, 2017 14:23
Wanna grab somtin in VR?
using UnityEngine;
using System.Collections;
public class Grab : MonoBehaviour {
public OVRInput.Controller controller;
// Use this for initialization
private GameObject grabbedObject;
private bool grabbing;
public const float THRES_GRAB = 0.55f;