《HelloGitHub》第 63 期
興趣是最好的老師,HelloGitHub 讓你對編程感興趣!

簡介
分享 GitHub 上有趣、入門級的開源項目。
這里有實戰(zhàn)項目、入門教程、黑科技、開源書籍、大廠開源項目等,涵蓋多種編程語言 Python、Java、Go、C/C++、Swift...讓你在短時間內(nèi)感受到開源的魅力,對編程產(chǎn)生興趣!
項目地址:https://github.com/521xueweihan/HelloGitHub
感謝大家點亮的每一個 Star ?
以下為本期內(nèi)容|每個月 28 號更新
C 項目
1、mgba:用 C 語言實現(xiàn)的 GBA 模擬器。喚起你童年回憶的同時,還能邊學(xué)邊玩,然后再約上三兩好友一起看看源碼和實現(xiàn),快樂就是這么簡單

地址:https://github.com/mgba-emu/mgba
C++ 項目
2、rocksdb:用 C++ 編寫的高性能鍵值存儲引擎。該項目是由 Fackbook 數(shù)據(jù)庫團隊基于 levelDB 開發(fā),鍵值均支持二進制流,能夠充分利用多核 CPU 獲得高性能,并兼容 levelDB 的 API 可謂是青出于藍而勝于藍。RocksDB 當(dāng)下十分流行,一些開源數(shù)據(jù)庫底層存儲用的就是它
地址:https://github.com/facebook/rocksdb
Go 項目
3、learngo:適合新手學(xué)習(xí) Go 語法的開源項目。學(xué)習(xí)一門編程語言最好的方法就是動手寫,該倉庫擁有 1000 多個 Go 語法的問題,讓你可以跟著練并附有答案
地址:https://github.com/inancgumus/learngo
4、tunny:可設(shè)置固定數(shù)量協(xié)程的 goroutine pool 庫。通過這個項目可實現(xiàn) goroutine 重復(fù)使用,從而避免過度創(chuàng)建 goroutine 而造成的內(nèi)存占用過多等問題
package main
import (
"io/ioutil"
"net/http"
"runtime"
"github.com/Jeffail/tunny"
)
func main() {
numCPUs := runtime.NumCPU()
pool := tunny.NewFunc(numCPUs, func(payload interface{}) interface{} {
var result []byte
// TODO: Something CPU heavy with payload
return result
})
defer pool.Close()
http.HandleFunc("/work", func(w http.ResponseWriter, r *http.Request) {
input, err := ioutil.ReadAll(r.Body)
if err != nil {
http.Error(w, "Internal error", http.StatusInternalServerError)
}
defer r.Body.Close()
// Funnel this work into our pool. This call is synchronous and will
// block until the job is completed.
result := pool.Process(input)
w.Write(result.([]byte))
})
http.ListenAndServe(":8080", nil)
}
地址:https://github.com/Jeffail/tunny
5、glab:用 Go 寫的 GitLab 命令行工具。通過它除了能夠在命令行管理項目、issues、合并提交之外,還能夠查看 CI 的運行狀態(tài)
api: Make authenticated REST/GRAPHQL
auth: Manage glab's authentication state
issue: Work with GitLab issues
label: Manage labels on remote
mr: Create, view and manage merge requests
ci: Work with GitLab CI pipelines and jobs
release: Manage GitLab releases
repo: Work with GitLab repositories and projects

地址:https://github.com/profclems/glab
6、fzf:能夠搜“一切”的模糊搜索命令行工具。它能夠搜文件、歷史命令、進程、git 提交記錄等信息,支持預(yù)覽內(nèi)容、整合到 Vim/Neovim 編輯器,而且搜索速度極快

地址:https://github.com/junegunn/fzf
7、godis:用 Go 語言寫的 Redis 服務(wù)器。它實現(xiàn)了 Redis 通信協(xié)議并兼容 redis-cli 客戶端,包含 5 種常用的數(shù)據(jù)結(jié)構(gòu)和命令比如:TTL、發(fā)布訂閱、地理位置以及 AOF 持久化等,Go 的初學(xué)者可以通過該項目能夠?qū)W習(xí)到關(guān)于 TCP、通信協(xié)議實現(xiàn)、常用的數(shù)據(jù)結(jié)構(gòu)等知識,Web 開發(fā)學(xué)煩了?換一個口味,寫個 Redis 作為實戰(zhàn)項目吧
地址:https://github.com/HDT3213/godis
Java 項目
8、ExoPlayer:谷歌官方開源的 Android 媒體播放器。易于定制和擴展,支持豐富的數(shù)據(jù)格式比如:FMP4、FLV、SmoothStreaming、MP3 等

地址:https://github.com/google/ExoPlayer
9、traccar:GPS 追蹤平臺。此項目支持 170 多種 GPS 協(xié)議,1500 多種型號的 GPS 設(shè)備,功能包含:實時 GPS 追蹤、數(shù)據(jù)統(tǒng)計報告、報警和通知等等
地址:https://github.com/traccar/traccar
10、airbyte:一個開源的 EL(T) 平臺。能簡單快速地把用戶提供的應(yīng)用、數(shù)據(jù)庫等地方的數(shù)據(jù)聚合到平臺,從而可以在一個平臺查詢、展示、更新、管理這些數(shù)據(jù)

地址:https://github.com/airbytehq/airbyte
11、Ward:擁有漂亮儀表盤的服務(wù)器監(jiān)控工具

地址:https://github.com/B-Software/Ward
JavaScript 項目
12、moovie.js:專注于電影的 HTML5 播放器。容易上手和使用,支持倍速播放、快捷鍵操作、字幕偏移即時調(diào)整等功能

地址:https://github.com/BMSVieira/moovie.js
13、nativefier:能夠把 Web 頁面變成本地應(yīng)用的命令行工具。通過 Electron+Chromium 把網(wǎng)站包裝成本地 .app、.exe 等可執(zhí)行文件,支持運行在 Windows、macOS 和 Linux 操作系統(tǒng)上

地址:https://github.com/nativefier/nativefier
14、lowdb:支持瀏覽器和 Electron 的輕量級 JSON 文件數(shù)據(jù)庫。如果是創(chuàng)建沒有后端的小型前端項目,但還有存儲和管理數(shù)據(jù)的需求,那就快試試 lowdb 吧
import { join } from 'path'
import { Low, JSONFile } from 'lowdb'
// 新建 JSON 文件用于存儲數(shù)據(jù)
const file = join(__dirname, 'db.json')
const adapter = new JSONFile(file)
const db = new Low(adapter)
// 把內(nèi)容更新到 db.data 并寫入 JSON 文件
db.data.posts.push({ id: 1, title: 'lowdb is awesome' }).write()
db.get('posts')
.filter({title: 'lowdb is awesome'})
.sortBy('id')
.take(5)
.value()
地址:https://github.com/typicode/lowdb
15、eruda:一個專為手機端設(shè)計的前端頁面調(diào)試工具。類似手機端迷你版開發(fā)者模式,可用于在手機端調(diào)試頁面。主要功能包括:顯示 console 日志、檢查元素狀態(tài)、捕獲 XHR 請求、顯示本地存儲和 Cookie 等信息

地址:https://github.com/liriliri/eruda
16、cusdis:這是一個界面清爽、注重隱私的輕量級博客評論系統(tǒng)。可以很方便地與 React、Vue 或其他博客系統(tǒng)結(jié)合,并且還提供了一個后臺來管理所有的評論。除此之外,還支持一鍵從 Disqus 導(dǎo)入、郵件通知等強大的功能

地址:https://github.com/djyde/cusdis
Kotlin 項目
17、mirai:由 Kotlin 語言編寫的 QQ 機器人框架。該項目提供了 Android QQ 協(xié)議的 API,通過這些 API 可以實現(xiàn)自動化操作,比如:群管理等功能,注意!該項目不支持一切商業(yè)使用。最后項目的 Kotlin 代碼寫的很好,感興趣的同學(xué)可以去看下源碼
地址:https://github.com/mamoe/mirai
Python 項目
18、pygame:用來開發(fā)游戲的 Python 庫。Pygame 已經(jīng)持續(xù)更新多年,網(wǎng)上的教程和資料十分充足,雖然在游戲開發(fā)領(lǐng)域 Python 只是個弟弟,但如果只是用這個庫開發(fā)個 2D 小游戲還是很順手的。推薦給想用 Python 寫個小游戲的朋友

地址:https://github.com/pygame/pygame
19、GitHubPoster:能夠把多個平臺上的數(shù)據(jù),生成類似 GitHub 綠墻圖像的工具。比如能夠把發(fā)推的頻率、扇貝單詞打卡等情況生成類似 GitHub 綠墻圖像,使用簡單感興趣的同學(xué)可以把玩一下

地址:https://github.com/yihong0618/GitHubPoster
20、guietta:用于制作簡單 GUI 程序的 Python 庫。換一種簡單的方式寫 GUI(圖形用戶界面)程序
from guietta import _, Gui, Quit
gui = Gui(
[ "Enter numbers:", "__a__", "+", "__b__", ["Calculate"] ],
[ "Result: -->", "result", _, _, _ ],
[ _, _, _, _, Quit ]
)
with gui.Calculate:
gui.result = float(gui.a) + float(gui.b)
gui.run()

地址:https://github.com/alfiopuglisi/guietta
Ruby 項目
21、forem:用來構(gòu)建社區(qū)的 Ruby 開源項目。一款開源、現(xiàn)成的論壇項目,能夠讓你快速搭建起來一個社區(qū)平臺。國外知名的程序員社區(qū) dev 用的就是它

地址:https://github.com/forem/forem
Rust 項目
22、rustdesk:免費開源的遠程桌面軟件。開箱即用無需任何配置,支持 Linux/Mac/Win/Android 等平臺。還能夠自行搭建服務(wù)器,由用戶自己掌控數(shù)據(jù),不必擔(dān)心隱私數(shù)據(jù)泄露的問題。在當(dāng)下越來越多的遠程桌面軟件都收費的情況下的另一個選擇

地址:https://github.com/rustdesk/rustdesk
23、indicatif:樣式豐富的 Rust 終端進度條庫
use indicatif::ProgressBar;
let bar = ProgressBar::new(1000);
for _ in 0..1000 {
bar.inc(1);
// ...
}
bar.finish();

地址:https://github.com/mitsuhiko/indicatif
24、azul:一個跨平臺的 Rust 和 C/C++ 的 GUI 框架。使用 WebRender 渲染引擎和 CSS/HTML-like DOM 構(gòu)建,可用于開發(fā)漂亮的原生桌面應(yīng)用程序
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use azul::prelude::*;
use azul_widgets::table_view::*;
struct TableDemo {
// cells: BTreeMap<TableCell, String>,
}
extern "C" fn layout(data: &mut RefAny, _: LayoutCallbackInfo) -> StyledDom {
let mut table_view_state = TableViewState::default();
table_view_state.set_cell_content(TableCellIndex { row: 2, column: 2 }, "Hello World");
table_view_state.set_selection(Some(TableCellSelection::from(3, 4).to(3, 4)));
TableView::new(table_view_state).dom().style(Css::empty())
}
fn main() {
let app = App::new(RefAny::new(TableDemo { }), AppConfig::new(LayoutSolver::Default));
app.run(WindowCreateOptions::new(layout));
}

地址:https://github.com/fschutt/azul
Swift 項目
25、Grid:受 CSS Grid 啟發(fā),用 SwiftUI 編寫關(guān)于視圖(view)布局的開源項目

地址:https://github.com/exyte/Grid
26、SwiftyJSON:一個 Swift JSON 三方庫,用更簡單的方式處理 JSON
let json = JSON(data: dataFromNetworking)
if let userName = json[0]["user"]["name"].string {
//Now you got your value
}
地址:https://github.com/SwiftyJSON/SwiftyJSON
其它
27、aind:實現(xiàn)在 Docker 中啟動安卓應(yīng)用的項目
docker run -td --name aind --privileged -p 5900:5900 -v /lib/modules:/lib/modules:ro ghcr.io/aind-containers/aind
docker exec aind cat /home/user/.vnc/passwdfile

地址:https://github.com/aind-containers/aind
28、librime:一款開源的中文輸入法。市面上的輸入法有很多,但你找到讓自己稱心如意的那款了嗎?或許通過今天的開源項目你就能找到它。RIME 這款開源的輸入法,它不追蹤輸入的內(nèi)容源碼完全開放,可自由切換繁/簡中文,選擇/設(shè)計輸入方案和主題,對繁體字輸入尤為優(yōu)秀。作為輸入法給予用戶無限的自由和個性化,作為輸入法框架讓開發(fā)者有更多的發(fā)揮空間。比如支持不同操作系統(tǒng)的版本:Linux(中州韻)、Windows(小狼毫)、macOS(鼠須管)、Android(同文)由于自由度較高上手需要一些時間,這大概就是獲得自由的代價吧

地址:https://github.com/rime/librime
29、android-foss:開源的安卓客戶端應(yīng)用集合
地址:https://github.com/offa/android-foss
30、secguide:騰訊開源的代碼安全指南。該項目包含:C/C++、Python、JavaScript、Java、Go 等語言的安全編碼指南,內(nèi)容簡單易懂能夠幫助開發(fā)者,在代碼源頭規(guī)避安全風(fēng)險減少漏洞

地址:https://github.com/Tencent/secguide
31、Kanmail:以看板的方式管理郵件的客戶端應(yīng)用。適用于 Mac/Windows 操作系統(tǒng),支持 Gmail、Outlook 等郵箱

地址:https://github.com/Oxygem/Kanmail
32、hello-world:匯集了 800 多種編程語言 Hello World 的項目
地址:https://github.com/leachim6/hello-world
33、material-theme-jetbrains:一款 JetBrains IDE 的 Material 風(fēng)格主題

地址:https://github.com/ChrisRM/material-theme-jetbrains
開源書籍
34、awesome-fenix:講述“如何構(gòu)建大型且可靠的分布式系統(tǒng)”的開源書籍。推薦給想成為架構(gòu)師的你
地址:https://github.com/fenixsoft/awesome-fenix
35、google-sre-ebook:Google SRE 相關(guān)的書籍。Google SRE 是谷歌的專業(yè)運維團隊的工程師,他們有一個共同的名字:Site Reliability Engineer,而這本書由 Google SRE 們撰寫,分享了谷歌運維相關(guān)的一些技術(shù)和知識

地址:https://github.com/captn3m0/google-sre-ebook
機器學(xué)習(xí)
36、AugLy:Facebook 開源的一個數(shù)據(jù)增強 Python 庫。該庫目前支持音頻、圖像、文本和視頻四種模式,一方面可以用現(xiàn)實數(shù)據(jù)對數(shù)據(jù)進行增強,另一方面還可以檢測出相似內(nèi)容,消除重復(fù)數(shù)據(jù)帶來的干擾

地址:https://github.com/facebookresearch/AugLy
37、Real-Time-Voice-Cloning:克隆某個人說話聲音的 AI 項目。僅需幾秒音頻,就能模仿出原音頻的人聲

地址:https://github.com/CorentinJ/Real-Time-Voice-Cloning
如果你發(fā)現(xiàn)了 GitHub 上有趣的項目,歡迎留言分享給大家。
如果在本期月刊找到了感興趣的開源項目,就趕緊玩起來吧!
以上就是 HelloGitHub 月刊本期的全部內(nèi)容,下個月 28 號見。
??在這里集合??
閱讀原文獲取更好的 PC 端閱讀體驗
