原创 如何關閉mysql的strict mode

I need do it this, and work correctly: To disable strict SQL mode, SSH in to your server as root Create this file: /etc

原创 redis 重新啓動

ps -u wentao -o pid,rss,command | grep redis  

原创 mutiprocess python3 多線程模塊

from multiprocessing import Pool import numpy if __name__ == '__main__': pool = Pool() roots = pool.map(nu

原创 mac環境Mongodb 安裝 備份與恢復

brew安裝mongodb報錯Error: No available formula with the name 'mongodb' 原因:MongoDB不再是開源的了,並且已經從Homebrew中移除 #43770 設定:  $ bre

原创 Mac OS X: ValueError: unknown locale: UTF-8 in Python

If you have faced the error on MacOS X, here's the quick fix - add these lines to your ~/.bash_profile: export LC_ALL

原创 Ubuntu mac使用虛擬環境virtualven python3, 本地terminal遠程登錄服務器ubuntu看圖方法

Mac 1. pip3 install virtualenv 2. python3 -m venv MYENV 3. source ./MYENV./bin/activate   Ubuntu  1. virtualenv -p

原创 匹配字典 dict python3

from collection import Counter counter = Counter({"book":1,"football":2,"light:"3}) list=["book","pen","light"] for

原创 本地關機時如何登錄在遠程Ubuntu運行程序且自動保存log

1. nohup python3 Training_Tool_dic.py 2>&1> log.log -a & 推薦   2. nohup           python3 file.py 2>&1 | tee log.log -a

原创 Ubuntu各種功能查看系統,cpu,顯卡,內存,統計目錄,統計字符 top

cat /proc/cpuinfo cat /proc/cpuinfo |grep MHz|uniq cat /proc/meminfo sudo dmidecode -t memory cat /proc/version

原创 python3 重裝jupyter

1. python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console notebook qtconsole nbconvert nbform

原创 改變mac終端文字顏色

vi ~/.bash_profile export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " export CLICOLO

原创 Docker 刪除所有image/container 如何查運行中的container:

    To delete all containers including its volumes use, docker rm -vf $(docker ps -a -q) To delete all the images, d

原创 python3 ModuleNotFoundError: No module named 'XXX' 解決方法

1. 暫時: import sys sys.path.append('/ufs/guido/lib/python') 2. 永久: vi ~/.bash_profile export PYTHONPATH="${PYTHONPATH

原创 mac redis安裝和開機啓動

  1. 安裝 brew install redis 2. 其他 Launch Redis on computer starts. $ ln -sfv /usr/local/opt/redis/*.plist ~/Library/Lau

原创 機器學習詞彙

1 .permutation invariant:空間不相關的 local permutation-invariant aggregation:局部的無空間相關性的聚集 https://arxiv.org/abs/1902.06673