Week 0x05 - GradioDay4 (2025/05/10)
Sat May 10 2025 21:30:00
簡報:https://hackmd.io/@hell-kitty/GradioDay4
共筆
-
日文的平/片假名有不同讀音
-
五十音列好了,可以直接下載 json
-
gr.Tab
/ gr.Tabs
- tabs 裡面用來放很多 tab
- 透過 return 新 tab 來做到刷新的效果
-
出題邏輯:
- 用 checkbox 分種類 (平/片假名 & 子分類)
- 小技巧:放一個 debug 的 textarea
- 不需要的時候
visible
改成 False
藏起來
-
- 主動的觸發錯誤處理 (raise error)
- 使用者沒有選擇分類時可以直接
raise
一個錯誤提示使用者
- json 內有個
spell
欄位可以用來對答案
-
Typing Hint
- 可以在參數後面加一個 "形態"
def foo(a: list)
-
串接 event
-
字體
-
下集預告
個人心得 & 聊天室
HackMD 新功能上線啦 (點圖可以放大)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- python 同意結構:
- {"key": "value"}
- dict(key="value")
現在正在進食狀態,可能會比較慢紀錄,ㄅ欠
k
我怎麼印象這玩意兒目前只有註解作用
原來會幫檢查嗎
應該是有 language server 才會 work
所以是 Plugin ?
在 vscode 會是,但應該包在 python plugin 裡面?
我覺得應該沒有? 至少這陣子我的 vscode 都不會提醒我
看來 vscode 有自帶
Announcing Pylance: Fast, feature-rich language support for Python in Visual Studio Code - Microsoft for Python Developers Blog
We are excited to announce Pylance, our fast and feature-rich language support for Python in Visual Studio Code! Pylance is available today in the Visual Studio Code marketplace. Pylance depends on our core Python extension and builds upon that experience, for those of you who have already installed it. Keep reading to learn more!
https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/
Hmmmm
↑ 我覺得可能還是要帶一些自己設定的部分,剛剛蝦幾把 google 了一下 (keyword: python type check + vscode ),有看到一些設置 language server 的討論
有沒有考慮 git (壓縮檔+隨身碟)(X)
版本控制100