安裝了windows 10 20H2,怎麼按windows update都不會出現21H2的更新,所以上網找了一下解法。
到以下微軟網站下載Windwos10更新小幫手,然後執行更新即可
安裝了windows 10 20H2,怎麼按windows update都不會出現21H2的更新,所以上網找了一下解法。
到以下微軟網站下載Windwos10更新小幫手,然後執行更新即可
之前在同步nextcloud時,發現有些檔案沒有修改日期
在command line下看時間都是1970/1/1,導致資料同步失敗
後來發現,只要檔案有更新,就會恢復同步的功能
所以研究了powershell,將所有檔案(包含子資料夾)的修改日期為1970/1/1的列出
然後將現在時間寫入lastwritetime欄位。
以下為powershell程式碼
# 取得檔案清單
$list = get-childitem -recurse -path "D:\NextCloud" | where-object {$_.LastWriteTime.Year -eq "1970"} | %{$_.FullName}
#變更修改日期
foreach($file in $list){(get-item $file).LastWriteTime =(get-date)}
# 更新系統
> sudo apt update
> sudo apt upgrade
> sudo apt dist-upgrade
# 抓取script
> wget https://raw.githubusercontent.com/yu210148/gvm_install/master/install_gvm.sh
> chmod +x install_gvm.sh
# 執行script
> sudo ./install_gvm.sh -v 21 -a -u
建立conda環境
> conda create --name chatterbot python=3.6
啟動環境
> conda activate chatterbot
安裝chatterbot及語料庫
> pip install chatterbot
> pip install chatterbot_corpus
安裝spacy
* 沒有安裝的話,執行範例的時候會出現錯誤
> pip install spacy==2.1.8
> python -m spacy download en
範例
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
# Create a new chat bot named Charlie
chatbot = ChatBot('Charlie')
trainer = ListTrainer(chatbot)
trainer.train([
"Hi, can I help you?",
"Sure, I'd like to book a flight to Iceland.",
"Your flight has been booked."
])
# Get a response to the input text 'I would like to book a flight.'
response = chatbot.get_response('I would like to book a flight.')
print(response)
參考網站:https://chatterbot.readthedocs.io/en/stable/examples.html
指令
switch#conf t
switch#crypto key zeroize
switch#crypto key generate rsa general-keys modulus 2048
switch#end
switch#wr
連線時出現的錯誤訊息
Unable to negotiate with 192.168.0.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
修改後的連線方式
ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -c aes256-cbc user@192.168.0.1