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
import tensorflow as tf | |
import numpy as np | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets('MNIST_data') | |
def main(): | |
def input(dataset): | |
return dataset.images, dataset.labels.astype(np.int32) |
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
package worker | |
type Task func() | |
type Dispatcher struct { | |
TaskQueue chan Task | |
pool chan chan Task | |
workers []*worker | |
} |
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
import numpy as np | |
''' | |
φ(x) = [x^0, x^1,...x^n-1] の縦ベクトル | |
''' | |
def phi(x, n): | |
return np.array([x**i for i in range(n)]).reshape(n, -1) | |
''' | |
式1.70 m(x) |
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
import numpy as np | |
from polys import poly_fit as y # 式1.1 | |
''' | |
演習問題 1.1 | |
X_n = [x_n^0, x_n^1, x_n^2, ...] | |
W = [w_0, w_1, w_2, ...] | |
E(W) = 1/2 * Σ[n]{y(X_n, W) - t_n}^2 = 1/2 * Σ[n]{W * X_n - t_n}^2 |
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
import tensorflow as tf | |
import numpy as np | |
import tf_utils as tfu | |
LAYER1_SIZE = 400 | |
LAYER2_SIZE = 300 | |
LEARNING_RATE = 1e-4 | |
TAU = 0.001 | |
BATCH_SIZE = 64 |
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
public class CallbackHelper<T> { | |
private final Map<CallbackLifecycle, SparseArray<T>> mCallbacks = new WeakHashMap<>(); | |
private final AtomicInteger mSeqId = new AtomicInteger(1); | |
public int getAndIncrementSeq() { | |
return mSeqId.getAndIncrement(); | |
} | |
public synchronized T getAndRemove(CallbackLifecycle lifecycle, int seq) { |
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
From 82040520df05810b6c4a4d9584c2f27f2de16a90 Mon Sep 17 00:00:00 2001 | |
From: Hirofumi Nakagawa <nklabs@gmail.com> | |
Date: Sun, 7 Sep 2014 03:29:53 +0900 | |
Subject: [PATCH] broadcom wl driver(hybrid-v35_64-nodebug-pcoem-6_30_223_248) | |
porting for 3.16 | |
--- | |
src/wl/sys/wl_cfg80211_hybrid.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) |
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
package com.example.hackpolicy; | |
import android.app.Service; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.IBinder; | |
import android.util.Log; | |
import android.view.Window; | |
import android.view.WindowManager; |
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
require 'sinatra' | |
post '/upload' do | |
p params | |
unless params[:test] && | |
(tmpfile = params[:test][:tempfile]) && | |
(name = params[:test][:filename]) | |
@error = "No file selected" | |
return 'error' | |
end |
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
package triaina.sample; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.Looper; | |
import android.os.Parcel; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.NavUtils; |
NewerOlder