100 個常見錯誤「GitHub 熱點速覽 v.22.35」

本周的特推非常得延續上周的特點——會玩,向別人家的女朋友發送早安。這個錯誤是如何發生的呢?如何有效避免呢?自己用 daily_morning 免部署、訂製一個早安小助手給女友吧。

除了生活中的錯誤,工作中的 Golang 使用錯誤怎麼辦?100-go-mistakes 收錄了 100 個錯誤發生場景和最佳實踐,有效避免加班修 Bug。

此外,還有 TS 的新手教程無痛繞坑上手新語言,surrealdb 開啟雲資料庫模式來體驗一把 Node.js 的爬蟲工具。

以下內容摘錄自微博@HelloGitHub 的 GitHub Trending 及 Hacker News 熱帖(簡稱 HN 熱帖),選項標準:新發布 | 實用 | 有趣,根據項目 release 時間分類,發布時間不超過 14 day 的項目會標註 New,無該標誌則說明項目 release 超過半月。由於本文篇幅有限,還有部分項目未能在本文展示,望周知 🌝

  • 本文目錄
      1. 本周特推
      • 1.1 消息推送:daily_morning
      • 1.2 TS 交互課程:beginners-typescript-tutorial
      1. GitHub Trending 周榜
      • 2.1 擴散模型:diffusers
      • 2.2 100 個 Go 常見錯誤:100-go-mistakes
      • 2.3 爬蟲工具:crawlee
      • 2.4 雲原生資料庫:surrealdb
      • 2.5 遊戲人物製作:Akebi-GC
      1. 往期回顧

1. 本周特推

1.1 消息推送:daily_morning

主語言:Python

New 「每日早安推送給別人家的女朋友」,這是一款免搭建、免定時、免編碼,極易上手的消息推送工具。通過微信公眾號的方式向自己(他人)的女朋友推送資訊。項目有相對應的教程截圖,還是很友好的。

GitHub 地址→//github.com/rxrw/daily_morning

1.2 TS 交互課程:beginners-typescript-tutorial

主語言:TypeScript

New 一個面向初學者友好的互動式 TypeScript 教程,配有相對應的練習。

GitHub 地址→//github.com/total-typescript/beginners-typescript-tutorial

2.1 擴散模型:diffusers

本周 star 增長數:1,700+,主語言:Python

Diffusers 提供了跨模態(例如視覺和音頻)的預處理擴散模型,並可用作推理和訓練擴散模型的模組化工具箱。特性:

  • 幾行程式碼實現推斷;
  • 多種噪音調度器;
  • 支援多種模型;
  • 培訓示例展示擴散模型;
  • 推理示例展示如何為優先順序更好的任務創建訂製管道,比如:image2image;

GitHub 地址→//github.com/huggingface/diffusers

2.2 100 個 Go 常見錯誤:100-go-mistakes

本周 star 增長數:550+,主語言:Go

如何避免這 100 個常見的 Go 使用錯誤呢?100-go-mistakes 收錄了具體的錯誤場景和最佳實踐。

GitHub 地址→//github.com/teivah/100-go-mistakes

2.3 爬蟲工具:crawlee

本周 star 增長數:2,000+,主語言:TypeScript

一個供 Node.js 用的網頁、瀏覽器爬取工具,可快速構建爬蟲。通過下面的方式你可以在自己的項目中使用它(前提:裝好 Playwright)

import { PlaywrightCrawler, Dataset } from 'crawlee';

// PlaywrightCrawler crawls the web using a headless
// browser controlled by the Playwright library.
const crawler = new PlaywrightCrawler({
    // Use the requestHandler to process each of the crawled pages.
    async requestHandler({ request, page, enqueueLinks, log }) {
        const title = await page.title();
        log.info(`Title of ${request.loadedUrl} is '${title}'`);

        // Save results as JSON to ./storage/datasets/default
        await Dataset.pushData({ title, url: request.loadedUrl });

        // Extract links from the current page
        // and add them to the crawling queue.
        await enqueueLinks();
    },
    // Uncomment this option to see the browser window.
    // headless: false,
});

// Add first URL to the queue and start the crawl.
await crawler.run(['//crawlee.dev']);

GitHub 地址→//github.com/apify/crawlee

2.4 雲原生資料庫:surrealdb

本周 star 增長數:2,850+,主語言:Rust

一個用於實時網路的可擴展、分散式、可協作的文檔圖資料庫。它通過簡化資料庫和 API 棧來減少應用程式的開發時間。SurrealDB 可以作為單機運行,也支援以高可用、高可擴展的分散式形式運行。它支援來自客戶端設備的 SQL 查詢、GraphQL、ACID、WebSocket、結構化和非結構化數據處理、全文索引、地理空間查詢及許可權控制。

GitHub 地址→//github.com/surrealdb/surrealdb

2.5 遊戲人物製作:Akebi-GC

本周 star 增長數:300+,主語言:C++

可用來開發遊戲的男女角色,項目用了原神來做 Demo 展示了地圖傳送、Noclip 等常見遊戲場景。

GitHub 地址→//github.com/Akebi-Group/Akebi-GC

3. 往期回顧

往期回顧:

以上為 2022 年第 35 個工作周的 GitHub Trending 🎉如果你 Pick 其他好玩、實用的 GitHub 項目,記得來 HelloGitHub issue 區和我們分享下喲 🌝

HelloGitHub 交流群現已全面開放,添加微訊號:HelloGitHub001 為好友入群,可同前端、Java、Go 等各界大佬談笑風生、切磋技術~