我想介紹一下CGrass,它可以從 GitHub 貢獻產生 3D 草圖像。您可以將生成的圖像放置在您的 Github 設定檔中。 CGrass 在 Github 操作上運行,因此您所要做的就是添加工作流程並稍微重寫 README。
↓ 您可以透過以下連結查看該專案的儲存庫
恩雷斯克
/
草叢
對 3D 草的貢獻
英文 | 日本文
如果您喜歡這個項目,請給它一顆星⭐️
CG草
CGrass 是一個 GitHub 貢獻影像產生器,可以與 GitHub Actions 整合。它允許您產生 GitHub 貢獻的 3D 圖像並將其設定在您的個人資料自述文件中。
開始使用
GitHub 操作
將以下程式碼複製到您的設定檔儲存庫中的 .github/workflows/cgrass.yml 檔案。
name: Generate Picture and Push to output branch on: push: branches: - main schedule: - cron: <span>'0 0 * * *'</span> <span># any time you want</span> permissions: contents: write jobs: generate: runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Generate Picture uses: nrysk/cgrass@v1.0.0 with: github_username: ${{ github.repository_owner }} github_token: ${{ secrets.GITHUB_TOKEN }} output_path: output/output.png command: <span>"theme"</span> argument: <span>"github</span>…
如何使用CGrass
1. 建立個人資料頁面
建立一個與您的 GitHub 使用者名稱同名的儲存庫。
如果您的 GitHub 使用者名稱是 nrysk,請建立一個名為 nrysk 的儲存庫。
2. 設定工作流程
建立一個名為 .github/workflows/cgrass.yml 的檔案。
name: Generate Picture and Push to output branch on: push: branches: - main schedule: - cron: <span>'0 0 * * *'</span> <span># any time you want</span> permissions: contents: write jobs: generate: runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Generate Picture uses: nrysk/cgrass@v1.0.0 with: github_username: ${{ github.repository_owner }} github_token: ${{ secrets.GITHUB_TOKEN }} output_path: output/output.png command: <span>"theme"</span> argument: <span>"github</span>
當您推送(或在 GitHub 上提交)時,GitHub Actions 將運行。一旦 Action 完成,生成的映像將保存在輸出分支中。
如果遇到分段錯誤,請重新執行。
3.更改主題
您可以透過修改參數欄位中的字串來切換主題。
我準備了 4 個主題:github、github-nograss、planet、planet-nograss。
name: Generate Picture and Push to output branch on: push: branches: - main schedule: - cron: '0 0 * * *' # Adjust the time as desired permissions: contents: write jobs: generate: runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Generate Picture uses: nrysk/cgrass@v1.0.0 with: github_username: ${{ github.repository_owner }} github_token: ${{ secrets.GITHUB_TOKEN }} output_path: output/output.png command: "theme" argument: "github" - name: Push output image to output branch uses: crazy-max/ghaction-github-pages@v4 with: target_branch: output build_dir: output commit_message: "Generate Output Image" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github
github-nograss
行星
行星無草
4. 將圖像加入您的個人資料中
要在您的個人資料的 README.md 中顯示圖像,請新增以下行並替換
- name: Generate Picture uses: nrysk/cgrass@v1.0.0 with: github_username: ${{ github.repository_owner }} github_token: ${{ secrets.GITHUB_TOKEN }} output_path: output/output.png command: "theme" argument: "github" # Change this part
(選修的)
您可以透過建立主題檔案來使用自訂主題。更多詳情請參考CGrass。
感謝您的閱讀
以上是☘️ 在你的 GitHub 個人資料上種草的詳細內容。更多資訊請關注PHP中文網其他相關文章!

Tomergelistsinpython,YouCanusethe操作員,estextMethod,ListComprehension,Oritertools

在Python3中,可以通過多種方法連接兩個列表:1)使用 運算符,適用於小列表,但對大列表效率低;2)使用extend方法,適用於大列表,內存效率高,但會修改原列表;3)使用*運算符,適用於合併多個列表,不修改原列表;4)使用itertools.chain,適用於大數據集,內存效率高。

使用join()方法是Python中從列表連接字符串最有效的方法。 1)使用join()方法高效且易讀。 2)循環使用 運算符對大列表效率低。 3)列表推導式與join()結合適用於需要轉換的場景。 4)reduce()方法適用於其他類型歸約,但對字符串連接效率低。完整句子結束。

pythonexecutionistheprocessoftransformingpypythoncodeintoExecutablestructions.1)InternterPreterReadSthecode,ConvertingTingitIntObyTecode,whepythonvirtualmachine(pvm)theglobalinterpreterpreterpreterpreterlock(gil)the thepythonvirtualmachine(pvm)

Python的關鍵特性包括:1.語法簡潔易懂,適合初學者;2.動態類型系統,提高開發速度;3.豐富的標準庫,支持多種任務;4.強大的社區和生態系統,提供廣泛支持;5.解釋性,適合腳本和快速原型開發;6.多範式支持,適用於各種編程風格。

Python是解釋型語言,但也包含編譯過程。 1)Python代碼先編譯成字節碼。 2)字節碼由Python虛擬機解釋執行。 3)這種混合機制使Python既靈活又高效,但執行速度不如完全編譯型語言。

UseeAforloopWheniteratingOveraseQuenceOrforAspecificnumberoftimes; useAwhiLeLoopWhenconTinuingUntilAcIntiment.forloopsareIdealForkNownsences,而WhileLeleLeleLeleLeleLoopSituationSituationsItuationsItuationSuationSituationswithUndEtermentersitations。

pythonloopscanleadtoerrorslikeinfiniteloops,modifyingListsDuringteritation,逐個偏置,零indexingissues,andnestedloopineflinefficiencies


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!

SublimeText3 Linux新版
SublimeText3 Linux最新版

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)