Skip to content

Instantly share code, notes, and snippets.

View keiji's full-sized avatar
🏠
Working from home

ARIYAMA Keiji keiji

🏠
Working from home
View GitHub Profile
@keiji
keiji / kaityo256.py
Last active July 3, 2018 02:22
Twitterで流れていた問題のアレ
# https://twitter.com/kaityo256/status/904279527353749509
import tensorflow as tf
a = tf.Variable(0.1)
b = tf.Variable(0.2)
c = tf.Variable(0.3)
result = a / (b + c) + b / (c + a) + c / (a + b)
groundtruth = tf.constant(4.0)
@keiji
keiji / tfbook1-errata.md
Last active June 22, 2017 02:43
TensorFlowはじめました 実践! 最新Googleマシンラーニング (正誤表)
public void authenticate (
FingerprintManager.CryptoObject crypto,
CancellationSignal cancel,
int flags,
FingerprintManager.AuthenticationCallback callback,
Handler handler)
@keiji
keiji / characters.json
Created November 24, 2015 10:03
Realm Meetup #9 発表資料用 - http://realm.connpass.com/event/22496/
{
"characters": [
{
"name": "Uduki Shimamura",
"age": "17",
"megane": false
},
{
"name": "Rin Shibuya",
"age": "15",
var data = { "pixel" : "%6%%%%%%%%%%%%%%%%%%69\n"
+ "%4%%%%%%%%%%%%%%%%%%%%%%67\n"
+ "%3%%%%%%%%%6%2%%%%%%%67\n"
+ "%2%%%%%%%%9%2%%%%%%%66\n"
+ "%%%%%%%%11%2%%%%%%%66\n"
+ "%%%%%%%12%2%%%%%%67\n"
+ "%%%%%%13%2%%%%%%%51%%14\n"
+ "%%%%%%%2%10%%%%%%%3%65\n"
+ "%%%%%%12%%%%%%%%%%%%%63\n"
+ "%%%%%%%2%12%%2%%%%%%%%%46%%14\n"
goodFeature側のbuild.gradleに、
android {
publishNonDefault true
productFlavors {
lib
}
}
@keiji
keiji / gist:9598675
Created March 17, 2014 12:54
YoutubeTest on Glass
package com.example.youtubetest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class MainActivity extends Activity {
private static final String VIDEO_URL1 = "https://www.youtube.com/watch?v=INmtQXUXez8";
お招きいただきありがとうございます。
おふたりの晴れの門出に立ち合わせていただくことを、とても嬉しく思っております。
喜んで出席させていただきます。
package com.example.sample;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
public class MainActivity extends Activity implements OnClickListener {
@keiji
keiji / gist:2005616
Created March 9, 2012 08:13
Basic auth
try {
String encodedAuth = Base64.encodeBytes((AUTH_USER_NAME + ":" + AUTH_PASSWORD)
.getBytes());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("User-Agent", USER_AGENT);
connection.setRequestProperty("Authorization", "Basic " + encodedAuth);
connection.setRequestMethod("GET");
connection.connect();