Skip to content

Instantly share code, notes, and snippets.

@zhowzeng
zhowzeng / test_litellm.py
Last active August 27, 2025 08:58
Langfuse tracing poc
"""langfuse < 3"""
import asyncio
from uuid import uuid4
import litellm
from litellm import acompletion, aembedding, completion, embedding
from rich import print
litellm.callbacks = ["langfuse"]
@zhowzeng
zhowzeng / fix_matplotlib_chinese.md
Last active December 6, 2023 03:54
修理 matplotlib 中文顯示錯誤
  1. 取得字體 (e.g. Droid-Sans-Fallback.ttf) 放到 <venv>/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/

  2. 編輯 <venv>/lib/python3.8/site-packages/matplotlib/mpl-data/matplotlibrc:257

    反註解兩行,把字體名稱加上去,注意到 Droid-Sans-Fallback- 要用 代替,並且放在最前面

    - #font.family:  sans-serif
    + font.family:  sans-serif
    #font.style:   normal
    #font.variant: normal

[Design Doc] Your Project Name

Design docs are a way to propose future work and get detailed technical feedback.

Problem Context

Brief description of what the problem or opportunity is. Give an overview of the domain and pain points. What is the current solution? Give some details about what its shortcomings are.

Proposed Solution