Skip to content

Instantly share code, notes, and snippets.

Hello

Hello World

gist install test.

PHP演習課題2 - CLIアプリケーション編

メモ管理アプリケーションを開発します。

以下の機能を持つPHPプログラム(memo.php)を開発します。

コマンドプロンプトで動作するCLIアプリケーションとして開発します。

1. メモ作成機能

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
class NeuralNetwork:
def __init__(self):
self.hw = 0.01 * np.random.randn(50, 4)
self.hb = np.zeros(50)
self.ow = 0.01 * np.random.randn(3, 50)
self.ob = np.zeros(3)
import tensorflow as tf
import numpy as np
features = [tf.contrib.layers.real_valued_column("x", dimension=1)]
estimator = tf.contrib.learn.LinearRegressor(feature_columns=features)
x = np.array([1., 2., 3., 4.])
y = np.array([0., -1., -2., -3.])
import numpy as np
import tensorflow as tf
W = tf.Variable([.3], tf.float32)
b = tf.Variable([-.3], tf.float32)
x = tf.placeholder(tf.float32)
model = W * x + b
y = tf.placeholder(tf.float32)
loss = tf.reduce_sum(tf.square(model - y))
@murayama333
murayama333 / commons-lang-maven.md
Last active August 29, 2015 14:23
Apache Common - Lang編 for Maven

Apache Commons - Lang編 for Maven

目的

commons-langのStringUtilsでテストする

Mavenプロジェクトを作成する

mvn archetype:generate
package com.example.app;
import java.util.Random;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.CompletionCallback;
import javax.ws.rs.container.Suspended;
import javax.ws.rs.core.Response;
package com.example.app;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.Suspended;
import javax.ws.rs.core.Response;
package com.example.app;
import java.util.Random;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.Suspended;
import javax.ws.rs.core.Response;