View cha_iot_rand.py
# -*- coding: utf-8 -*-
import numpy as np
import chainer
from chainer import cuda, Function, gradient_check, Variable, optimizers, serializers, utils
from chainer import Link, Chain, ChainList
import chainer.functions as F
import chainer.links as L
import time
from matplotlib import pyplot as plt
View test_rnn2-blog.py
# encoding: utf-8
from keras.models import Sequential
from keras.layers.core import Dense, Activation
from keras.layers.recurrent import LSTM
from keras.optimizers import Adam
from keras.callbacks import EarlyStopping
import sys
import numpy as np
View yosoku_update_one.py
# -*- coding: utf-8 -*-
import requests
import json
import time
import sys
import gc
import traceback
import api_func
import com_func
View yosoku_update.service
[Unit]
Description = tesorFlow Learning server
[Service]
ExecStart=/usr/bin/python /usr/local/yosoku_update/yosoku_update.py
Restart=always
Type=simple
[Install]
WantedBy=multi-user.target
View ai_func.py
import tensorflow as tf
import json
from urllib2 import urlopen
import api_func
#ai_func
class ai_funcClass:
def __init__(self):
print ""
View yosoku_update.py
#import tensorflow as tf
import json
from urllib2 import urlopen
import datetime
import threading
import time
import sys
import traceback
import api_func
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
import sys
import traceback
import com_func
View gist:c5c9f8230b7265f330933865bc69333e
import tensorflow as tf
if __name__ == "__main__":
# Model parameters
W = tf.Variable([0.0], dtype=tf.float32)
b = tf.Variable([0.0], dtype=tf.float32)
# Model input and output
x = tf.placeholder(tf.float32)
y = tf.placeholder(tf.float32)
linear_model = W*x + b
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
import sys
import traceback
import com_func
View wt-api.php
<?php
// $file = 'dat/rest-data.json';
class AppConst {
var $val01 = 'val01_###';
var $mDir='dat';
var $mExtName ='.json';
var $mOK_CODE=1;
var $mNG_CODE=0;