Skip to content

Instantly share code, notes, and snippets.

/*
* 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"
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
#!/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}
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
"""
Control pixel ring on ReSpeaker V2
sudo apt install python-mraa libmraa1
pip install pixel-ring
"""
import time
import logging
@Pillar1989
Pillar1989 / readme.md
Created March 26, 2018 15:52
叮当机器人

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

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
@Pillar1989
Pillar1989 / Lua打印table
Created November 4, 2016 08:36
Lua打印table
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 .. "{")
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 .. "{")
<!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()
{