Skip to content

Instantly share code, notes, and snippets.

Kouji Nakashima kuc-arc-f

Block or report user

Report or block kuc-arc-f

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kuc-arc-f
kuc-arc-f / webhook.py
Last active Jan 3, 2018
GoogleHome (dialogFlow) webhook , tensorFlow reusult output
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
@kuc-arc-f
kuc-arc-f / webhook.py
Created Nov 15, 2017
webhook (python27 ) GoogleHome +Iot( sensor data ) with dialogFlow
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
import sys
import traceback
import com_func
@kuc-arc-f
kuc-arc-f / wt-api.php
Created Oct 27, 2017
IoT data seve API (php) for GoogleHome
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;
@kuc-arc-f
kuc-arc-f / webhook.py
Created Oct 25, 2017
GoogleHome- Dialogflow (webhook) ,read Sensor value API (python )
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
#define
mDnsName="http://your-DNS.jp"
#
@kuc-arc-f
kuc-arc-f / attiny85_to_esp8266_at.ino
Created Oct 7, 2015
ATtiny85 send to esp8266, AT command data (Serial)
View attiny85_to_esp8266_at.ino
/*
attiny85_to_esp8266_at.ino
ATtiny85 send to esp8266(AT), SoftwareSerial data
[ Arduino SDK 1.0.5 ]
PIN : D3=RX, D4=TX, A1=Analog Input
AT+CIPSEND : Input required, HTTP data Length (manual count)
*/
#include <SoftwareSerial.h>
int mNextTime=30;
@kuc-arc-f
kuc-arc-f / main.cpp
Created Oct 3, 2017
microbit-adc-2/main.cpp, micro:bit adc read, P0
View main.cpp
//microbit-adc-2/main.cpp
#include "mbed.h"
#include <stdio.h>
#include <string>
Serial mPc(USBTX, USBRX);
AnalogIn mySensor(P0_3 );
//
@kuc-arc-f
kuc-arc-f / main.cpp
Created Oct 3, 2017
BLE_GAP_Example2/main.cpp ,micro:bit BLE driver , advertising
View main.cpp
// BLE_GAP_Example2/main.cpp
/* mbed Microcontroller Library
* Copyright (c) 2006-2015 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_bat1-b2.ino
Last active Sep 20, 2017
RN4020 +atmega328 driver, Low power version
View RN4020_sv2_0_9_3_bat1-b2.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 switch add, battery =1 QTY
v 0.9.03 - Beta-2
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_bat1.ino
Created Sep 19, 2017
Rn4020+ atmega328 BLE driver, Low power version battery= 1
View RN4020_sv2_0_9_3_bat1.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 switch add, battery =1 QTY
v 0.9.03
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
You can’t perform that action at this time.