A Pen by Shigeru Kobayashi on CodePen.
This file contains hidden or 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
console.clear(); | |
// Derived from https://github.com/therewasaguy/p5-music-viz/blob/gh-pages/demos/04b_fft_spectrograph/sketch.js | |
let mic; | |
let fft; | |
let index = 0; | |
let isRecording = false; | |
const speed = 1; |
- Point your web browser to https://ifttt.com/maker_webhooks
- Click on ‘Documentation’ at the top right
- Copy and paste the key to your notepad
- Paste the key to the ‘key’ field and click on the ‘Fire’ button
A Pen by Shigeru Kobayashi on CodePen.
This file contains hidden or 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
// Reference | |
// https://github.com/mattcam/tfjs_xor_example | |
const model = tf.sequential(); | |
model.add(tf.layers.dense({ units: 10, activation: "sigmoid", inputShape: [2] })); | |
model.add(tf.layers.dense({ units: 1, activation: "sigmoid" })); | |
model.compile({ optimizer: "rmsprop", loss: "meanSquaredError" }); | |
const trainingData = tf.tensor2d([[0, 0], [0, 1], [1, 0], [1, 1]]); | |
const targetData = tf.tensor2d([[0], [1], [1], [0]]); |
This file contains hidden or 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
POST https://my-service.com/action | |
Headers: | |
Content-type: application/json | |
POST body: | |
{ | |
"lang": "en", | |
"status": { | |
"errorType": "success", |
This file contains hidden or 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
function onDailyTimeBasedTrigger(event) { | |
// 現在ブラウザで開いているシートを取得する | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
// スクリプトのプロパティからメールの受信者を取得 | |
var scriptProperties = PropertiesService.getScriptProperties(); | |
var recipient = scriptProperties.getProperty('recipient'); | |
// トリガーを削除 | |
deleteTrigger(); |
This file contains hidden or 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
# Original: https://people.csail.mit.edu/hubert/pyaudio/ | |
# Modified to be tested on a Raspberry Pi | |
"""PyAudio example: Record a few seconds of audio and save to a WAVE file.""" | |
import pyaudio | |
import wave | |
CHUNK = 1024 | |
FORMAT = pyaudio.paInt16 |
This file contains hidden or 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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=JP | |
network={ | |
ssid="YOUR_SSID" | |
psk="YOUR_PASS" | |
key_mgmt=WPA-PSK | |
} |
This file contains hidden or 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
#include <ESP8266WiFi.h> | |
// PubSubClientライブラリでのパケットサイズは128バイトなのを拡張 | |
#define MQTT_MAX_PACKET_SIZE 1024 | |
#include <PubSubClient.h> | |
#include <ArduinoJson.h> | |
#include "config.h" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Meshblu Subscriber</title> | |
<script src="http://meshblu.octoblu.com/js/meshblu.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
var conn = meshblu.createConnection({ | |
"uuid": "********-****-****-****-************", |