sudo apt install python3-dev bison libasound2-dev python3-pyaudio libatlas-base-dev python3-pymad cmake uuid-dev fswebcam libav-tools python3-pip python3-yaml python3-requests python3-qrcode --yes sudo pip3 install pydub APScheduler
This file contains 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
/* | |
* Routines to access hardware | |
* | |
* Copyright (c) 2014 Realtek Semiconductor Corp. | |
* | |
* This module is a confidential and proprietary property of RealTek and | |
* possession or use of this module requires written permission of RealTek. | |
*/ | |
#include "device.h" |
This file contains 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
import requests | |
import json | |
import base64 | |
import wave | |
from pydub import AudioSegment ###需要安装pydub、ffmpeg | |
import io | |
class BaiduRest: | |
def __init__(self, cu_id, api_key, api_secert): | |
# token认证的url |
This file contains 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
#!/bin/sh | |
c="true" | |
count=0 | |
while c=="true" | |
do | |
d="true" | |
python3 recorder.py > log.txt | |
cat log.txt | grep "channel: 0 RMS: " | awk -F':' '{print $NF}' | while read LINE | |
do | |
echo ${LINE} |
This file contains 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
pip install pixel-ring | |
echo "TZ='Asia/Shanghai'; export TZ" >> /etc/profile | |
echo "[Unit]" >> /lib/systemd/system/test.service | |
echo "Description=Simplified simple board service" >> /lib/systemd/system/test.service | |
echo "After=NetworkManager.service" >> /lib/systemd/system/test.service | |
echo " " >> /lib/systemd/system/test.service | |
echo "[Service]" >> /lib/systemd/system/test.service |
This file contains 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
""" | |
Control pixel ring on ReSpeaker V2 | |
sudo apt install python-mraa libmraa1 | |
pip install pixel-ring | |
""" | |
import time | |
import logging |
This file contains 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
diff -ru mt7610u_wifi_sta_v3002_dpo_20130916.orig/conf/RT2870STA.dat mt7610u_wifi_sta_v3002_dpo_20130916/conf/RT2870STA.dat | |
--- mt7610u_wifi_sta_v3002_dpo_20130916.orig/conf/RT2870STA.dat 2015-04-24 03:01:48.612387993 +0000 | |
+++ mt7610u_wifi_sta_v3002_dpo_20130916/conf/RT2870STA.dat 2015-04-24 03:23:32.330434121 +0000 | |
@@ -4,7 +4,7 @@ | |
CountryRegionABand=7 | |
CountryCode= | |
ChannelGeography=1 | |
-SSID=11n-AP | |
+SSID= | |
NetworkType=Infra |
This file contains 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 PrintTable( tbl , level, filteDefault) | |
local msg = "" | |
filteDefault = filteDefault or true | |
level = level or 1 | |
local indent_str = "" | |
for i = 1, level do | |
indent_str = indent_str.." " | |
end | |
print(indent_str .. "{") |
This file contains 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 PrintTable( tbl , level, filteDefault) | |
local msg = "" | |
filteDefault = filteDefault or true | |
level = level or 1 | |
local indent_str = "" | |
for i = 1, level do | |
indent_str = indent_str.." " | |
end | |
print(indent_str .. "{") |
This file contains 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> | |
<meta charset="utf-8" /> | |
<title>WebSocket Test</title> | |
<script language="javascript" type="text/javascript"> | |
var wsUri = "ws://192.168.199.153/websocket/"; | |
var output; | |
function init() | |
{ |