This commit is contained in:
light 2018-02-12 16:27:08 +08:00
parent 2f93d4a638
commit ad583d960b
11 changed files with 159 additions and 2 deletions

View File

@ -0,0 +1,20 @@
# 实时读取显示波形和频谱
> 环境: Ubuntu16.04 python2.12 matplotlib
> 源码: https://github.com/lightjiang/AudioProcess
## 效果图
![img1](https://github.com/lightjiang/AudioProcess/raw/master/audio_process_1.png)
![img2](https://github.com/lightjiang/AudioProcess/raw/master/audio_process_2.png)
发 呜呜~ 音, 低频部分明显上升
![img3](https://github.com/lightjiang/AudioProcess/raw/master/audio_process_3.png)
傅里叶变换直接调用的numpy.fft工具大概就能看个分布趋势吧
matplot动图更新频率因为帧读取长度选择而定调高没用 read会阻塞住
其他的就看看源码吧,就不到一百行代码,自己随便调调试试就行

View File

@ -31,3 +31,9 @@ EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
```
``` bash
docker run -p 27017:27017 -v $PWD/db:/data/db -d mongo:3.2
```

View File

@ -81,4 +81,18 @@ server server1 ******:3801 maxconn 20480
```
haproxy -f /etc/haproxy/haproxy.cfg
haproxy -f /etc/haproxy/haproxy.cfg
## proxychain
``` bash
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychain
make
make install
make install-config
```

59
go/install.md Normal file
View File

@ -0,0 +1,59 @@
# go环境部署
- Ubuntu 16.04/64
- referring to : https://golang.google.cn/doc/install
## download
- https://golang.google.cn/dl/
## install
``` bash
tar -C /usr/local -xzf go1.9.3.linux-amd64.tar.gz
```
## add path
``` bash
export PATH=$PATH:/usr/local/go/bin
```
## create workspace
``` bash
mkdir ~/go
mkdir ~/go/src
mkdir ~/go/bin
```
## hello world
``` bash
mkdir ~/go/src/hello
nano ~/go/src/hello/hello.md
```
add fellows
``` go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
```
``` bash
cd ~/go/src/hello
go build
./hello
# or
go install
cd ~/go/bin
./hello
```

19
python/dlib.md Normal file
View File

@ -0,0 +1,19 @@
# dilib使用笔记
## installation
``` bash
git clone https://github.com/davisking/dlib.git
# 编译
cd dlib
mkdir build
cd build
cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1
cmake --build
# 编译安装python包
cd ..
python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA
```

2
python/pyaudio.md Normal file
View File

@ -0,0 +1,2 @@
sudo apt-get install portaudio19-dev python-all-dev python3-all-dev
pip install pyaudio

10
ubuntu/sysmonitor.md Normal file
View File

@ -0,0 +1,10 @@
# Ubuntu 实时显示网速、CPU占用等状态
``` bash
sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt-get update
sudo apt-get install indicator-sysmonitor
indicator-sysmonitor &
```

8
ubuntu/zsh.md Normal file
View File

@ -0,0 +1,8 @@
``` bash
sudo apt install -y zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s /bin/zsh
sudo reboot -h now
```

16
vue/eslint.md Normal file
View File

@ -0,0 +1,16 @@
# vue eslint config
## .eslintrc.js
```
# rules:
'camelcase': 0,
```
## .eslintignore
``` bash
build/*.js
config/*.js
src/libs/*.js
```

View File

@ -1,4 +1,7 @@
# Start a vue project
npm install -g vue
npm install -g vue-cli
npm install -g cnpm --registry=https://registry.npm.taobao.org
vue init webpack-simple myproject
@ -6,4 +9,4 @@ cd myproject
npm install
npm run dev
npm run dev