2018年4月5日 星期四

強制 Gunicorn 使用 Python 3

$ vi run_gunicorn.py

#-*- coding: utf-8 -*-
import re
import sys
from gunicorn.app.wsgiapp import run
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$','',sys.argv[0])
    sys.exit(run())

$ python3 run_gunicorn.py -w 4 -b 0.0.0.0:5000 main:app




References :

2018年3月7日 星期三

2018年3月6日 星期二

OpenWRT cp210x driver

# opkg update
# opkg install kmod-usb-uhci
# opkg install kmod-usb-ohci
# opkg install kmod-usb2
# opkg install kmod-usb-serial-cp210x




References :
OpenWrt/LEDEでUSBシリアル変換アダプタを使う - Qiita

2017年12月27日 星期三

pip "403 Must access using HTTPS instead of HTTP"

Uninsatll pip
# pip uninstall pip
# apt-get purge python-pip

Reinstall pip
$ wget https://bootstrap.pypa.io/get-pip.py
# python get-pip.py




References :

2017年12月25日 星期一

InfluxDB admin interface available

As of version 1.3, the web admin interface is no longer available in InfluxDB. The interface does not run on port 8083and InfluxDB ignores the [admin] section in the configuration file if that section is present. Chronograf replaces the web admin interface with improved tooling for querying data, writing data, and database management. See Chronograf’s transition guide for more information.