Skip to content

Instantly share code, notes, and snippets.

View thorikawa's full-sized avatar

Takahiro "Poly" Horikawa thorikawa

View GitHub Profile
@thorikawa
thorikawa / features.txt
Last active August 29, 2015 14:03
Samsung Gear Live available features and sensors
06-27 23:55:34.683 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.bluetooth
06-27 23:55:34.683 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.bluetooth_le
06-27 23:55:34.683 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.faketouch
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.location
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.microphone
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.screen.portrait
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.sensor.accelerometer
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.sensor.compass
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.sensor.gyroscope
06-27 23:55:34.693 1479-1479/com.polysfactory.secondwear D/TEST﹕ android.hardware.sensor.heartrate
@thorikawa
thorikawa / build.gradle
Created June 29, 2014 00:25
build.gradle for wearable
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.wearapp"
minSdkVersion 20
@thorikawa
thorikawa / JULIETTEY20MP.urdf
Created December 26, 2014 11:58
Pepper's urdf
<?xml version="1.0"?>
<!--
This file is the urdf description of an Aldebaran Robotics robot.
It has been generated by robot_description tool available in the simulator-sdk.
For more information about urdf, see http://www.ros.org/wiki/urdf/
-->
<robot name="Juliette">
<material name="LightGrey">
<color rgba="0.9 0.9 0.9 1.0"/>
</material>
@thorikawa
thorikawa / bingtest.cpp
Last active August 29, 2015 14:14
Test code for ObjectnessBING
#include <opencv2/opencv.hpp>
#include <opencv2/saliency.hpp>
using namespace cv;
using namespace std;
using namespace saliency;
bool myfunction (int i, int j) { return (i<j); }
int main (int argc, const char * argv[]) {
@thorikawa
thorikawa / SquareScores.java
Created April 2, 2015 05:31
TopCoder SRM654 DIV1
public class SquareScores {
double dpProb[][] = new double[1010][27];
double dpExp[][] = new double[1010][27];
public double calcexpectation(int[] p, String s) {
double prob[] = new double[26];
for (int i=0; i<26; i++) {
if (i < p.length) {
prob[i] = (double)(p[i]) / 100.0;
#include <opencv2/opencv.hpp>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <assert.h>
#define mp make_pair
#define pb push_back
@thorikawa
thorikawa / build.xml
Created February 26, 2012 18:42
improved build.xml for Android SDK r16
<?xml version="1.0" encoding="UTF-8"?>
<project name="android_rules" default="debug">
<!--
This build file is imported by the project build file. It contains
all the targets and tasks necessary to build Android projects, be they
regular projects, library projects, or test projects.
At the beginning of the file is a list of properties that can be overridden
by adding them to your ant.properties (properties are immutable, so their
@thorikawa
thorikawa / helloworld.cpp
Created August 14, 2012 06:44
OpenCV Hello World
#include <opencv2/opencv.hpp>
int main () {
cvNamedWindow( "My Window", 1 );
IplImage *img = cvCreateImage( cvSize( 640, 480 ), IPL_DEPTH_8U, 1 );
CvFont font;
double hScale = 2.0;
double vScale = 2.0;
int lineWidth = 5;
cvInitFont(&font, CV_FONT_HERSHEY_SIMPLEX | CV_FONT_ITALIC, hScale, vScale, 0, lineWidth);
@thorikawa
thorikawa / matching_sift.cpp
Created August 19, 2012 10:41
Keypoints matching with SIFT
#include <opencv2/opencv.hpp>
#include <opencv2/nonfree/nonfree.hpp>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
using namespace cv;
const double THRESHOLD = 400;
@thorikawa
thorikawa / pepper-mixpanel.py
Created October 12, 2015 01:55
モジュール追加などなしでPepperからmixpanelにイベントデータを送るためのボックス用スクリプト
import urllib2, json, base64, calendar, time
class MyClass(GeneratedClass):
def __init__(self):
GeneratedClass.__init__(self)
def onLoad(self):
#put initialization code here
pass