原创 mac中jupyter notebook python2和3共存
Kernels for Python 2 and 3 If you’re running Jupyter on Python 3, you can set up a Python 2 kernel after checking your
原创 jupyter notebook kernel error
1. 先運行下行⬇️代碼,看電腦中的kernel路徑, jupyter kernelspec list 比如: python2 /usr/local/share/jupyter/kernels/python2 pytorc
原创 python3導入tesserocr時遇到!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209 Illegal
在進入Python之前先輸入這行代碼 export LC_ALL=C
原创 No module named 'mxnet'
一開始直接用終端命令啓動jupyter notebook,打開ipynb文件以後運行代碼,會顯示No module named 'mxnet'。 查閱資料後發現需要先激活環境爲gluon, source activate gluon 然
原创 Numpy的random函數的總結
原文:https://www.cnblogs.com/lemonbit/p/6864179.html 在python數據分析的學習和應用過程中,經常需要用到numpy的隨機函數,由於隨機函數random的功能比較多,經常會混淆或記不住,下
原创 python 錯誤 SyntaxError: invalid character in identifier
解釋器提示如:SyntaxError: invalid character in identifier, 但又一直找不到問題點的話,請確保代碼行內沒有夾雜中文的空格,tab等,非文字字符. 例如 for x in range(10):
原创 python import 上級目錄
python import 上級目錄 有時候我們可能需要import另一個路徑下的python文件,例如下面這個目錄結構,我們想要在_train.py裏import在networks目錄下的_lstm.py和上級目錄下的_confi
原创 Python打開文件,將list、numpy數組內容寫入txt文件中
python保存numpy數據: numpy.savetxt("result.txt", numpy_data); 保存list數據: file=open('data.txt','w') file.write(str(list_da
原创 曼哈頓距離算法詳解(含公式)
歐氏距離是人們在解析幾何裏最常用的一種計算方法,但是計算起來比較複雜,要平方,加和,再開方,而人們在空間幾何中度量距離很多場合其實是可以做一些簡化的。曼哈頓距離就是由 19 世紀著名的德國猶太人數學家赫爾曼·閔可夫斯基發明的(圖 1)。
原创 一行腳本批量下載嗶哩嗶哩視頻
比如下載https://www.bilibili.com/video/av33087749/?p=的1到3集。 for i in $(seq 1 3); do you-get https://www.bilibili.com/video
原创 怎樣快速的轉換FLV視頻爲MP4格式?
進入你的FLV所在的文件夾 如果是單個文件,就用如下命令: ffmpeg -i "input.flv" -c copy "output.mp4" 將這裏的input改爲你的文件名,output改爲你想得到的文件名即可。 如果是整個文件夾中
原创 安裝Anaconda3報錯bunzip2: command not found
apt-get install bzip2
原创 -bash: yum: command not found
apt-get install yum
原创 #include "ios" error in mac Mojave
在安裝模塊之前在最前面加上CFLAGS='-stdlib=libc++',就像下面這個這樣⤵️ CFLAGS='-stdlib=libc++' pip install MODEL_URL 參考:https://github.com/hug
原创 !strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209 Illegal instruction: 4
調用tesserocr 出現這個問題 !strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209 Illegal instruction: 4 在進入p