Skip to content

Instantly share code, notes, and snippets.

View kotobuki's full-sized avatar

Shigeru Kobayashi kotobuki

  • Institute of Advanced Media Arts and Sciences [IAMAS]
  • X @kotobuki
View GitHub Profile
@kotobuki
kotobuki / script.js
Last active March 14, 2024 18:02
Web Bluetooth with micro:bit (UART)
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
// An implementation of Nordic Semicondutor's UART/Serial Port Emulation over Bluetooth low energy
const UART_SERVICE_UUID = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
// Allows the micro:bit to transmit a byte array
const UART_TX_CHARACTERISTIC_UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
// Allows a connected client to send a byte array
const UART_RX_CHARACTERISTIC_UUID = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
@kotobuki
kotobuki / script.js
Last active June 12, 2023 14:23
Web Bluetooth with micro:bit (Acceleration)
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
const ACCELEROMETER_SERVICE_UUID = "e95d0753-251d-470a-a062-fa1922dfa9a8";
const ACCELEROMETER_DATA_UUID = "e95dca4b-251d-470a-a062-fa1922dfa9a8";
let uBitDevice;
let sinThetaX = 0;
let sinThetaY = 0;
let lastAccelerationX = 0;
let lastAccelerationY = 0;
@kotobuki
kotobuki / script.js
Created September 3, 2018 07:59
Transfer Learning w/ Data Augmentation
console.clear();
const FOR_TRAINING = 0;
const FOR_TESTING = 1;
let featureExtractor;
let classifier;
let status;
let fileInput;
let testFileInput;
@kotobuki
kotobuki / index.html
Created August 30, 2018 04:42
Video Classification
<html>
<head>
<meta charset="UTF-8">
<title>Webcam Image Classification using MobileNet and p5.js</title>
</head>
<body>
<h1>Webcam Image Classification using MobileNet and p5.js</h1>
<p id='status'>Loading Model...</p>
@kotobuki
kotobuki / index.html
Last active August 31, 2018 12:10
Video Classification + IFTTT Trigger
<html>
<head>
<meta charset="UTF-8">
<title>Webcam Image Classification using MobileNet and p5.js</title>
</head>
<body>
<h1>Webcam Image Classification using MobileNet and p5.js</h1>
<p id='status'>Loading Model...</p>
@kotobuki
kotobuki / getting-started-with-javascript.markdown
Last active October 7, 2018 01:20
Getting Started with JavaScript
@kotobuki
kotobuki / linear-regression.markdown
Last active August 31, 2018 13:38
Linear Regression
@kotobuki
kotobuki / script.js
Created August 20, 2018 09:48
Transfer Learning with Spectrogram Images
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;
@kotobuki
kotobuki / grad-cam-wip.markdown
Last active August 20, 2018 03:42
Grad-CAM [WIP]
@kotobuki
kotobuki / ifttt-trigger.markdown
Last active October 14, 2018 06:50
IFTTT Trigger