Skip to content

Instantly share code, notes, and snippets.

View pondahai's full-sized avatar

彭大海 pondahai

View GitHub Profile
private BluetoothAdapter.LeScanCallback mLeScanCallback =
new BluetoothAdapter.LeScanCallback() {
@Override public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) {
runOnUiThread(new Runnable() {
@Override public void run() {
runOnUiThread(new Runnable() {
@Override public void run() {
addDevice(device, rssi);
import argparse
import cv2
helpText = "'Esc' to Quit"
def parse_args():
parser = argparse.ArgumentParser(description="CV2 Video Capture Test")
parser.add_argument("--vid", dest="video_dev",
help="video device # of USB webcam (/dev/video?) [1]",
import argparse
import cv2
import numpy
helpText = "'Esc' to Quit"
def parse_args():
parser = argparse.ArgumentParser(description="CV2 Video Capture PhotoPlethysmoGram Test")
parser.add_argument("--vid", dest="video_dev",
# --------------------------------------------------------
# Camera Caffe sample code for Tegra X2/X1
#
# This program captures and displays video from IP CAM,
# USB webcam, or the Tegra onboard camera, and do real-time
# image classification (inference) with Caffe. Refer to the
# following blog post for how to set up and run the code:
#
# https://jkjung-avt.github.io/tx2-camera-caffe/
#
/*
----------------------- pin 9
|
|
\
/
\ 100 ohm
/
|
| \ |
// Simple gamepad example that demonstraits how to read five Arduino
// digital pins and map them to the Arduino Joystick library.
//
// The digital pins 2 - 6 are grounded when they are pressed.
// Pin 2 = UP
// Pin 3 = RIGHT
// Pin 4 = DOWN
// Pin 5 = LEFT
// Pin 6 = FIRE
//
// Simple gamepad example that demonstraits how to read five Arduino
// digital pins and map them to the Arduino Joystick library.
//
// The digital pins 2 - 6 are grounded when they are pressed.
// Pin 2 = UP
// Pin 3 = RIGHT
// Pin 4 = DOWN
// Pin 5 = LEFT
// Pin 6 = FIRE
// Pin 7 = FIRE
import argparse
import cv2
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import detrend
helpText = "'Esc' to Quit"
def parse_args():
import argparse
import cv2
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import detrend
helpText = "'Esc' to Quit"
def parse_args():
/*global self, document, DOMException */
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
// Full polyfill for browsers with no classList support
if (!("classList" in document.createElement("_"))) {
(function (view) {
"use strict";