下拉刷新

Here you can read past volumes of HelloGitHub Monthly by category. You are currently viewing the HelloGitHub Python collection.

Star 2.5k
Vol.106
17 hours ago

Lightweight Text Chunking Python Library. This is a lightweight text chunking library designed specifically for RAG applications. It is easy to use and fast, capable of splitting text into fixed sizes, supporting various tokenizers, vector models, and flexible chunking strategies, suitable for long text processing and constructing RAG applications.

from chonkie import TokenChunker from tokenizers import Tokenizer tokenizer = Tokenizer.from_pretrained("gpt2") chunker = TokenChunker(tokenizer) chunks = chunker("HelloGitHub! Chonkie, the chunking library is so cool! I love the tiny hippo hehe.") for chunk in chunks: print(f"Chunk: {chunk.text}") print(f"Tokens: {chunk.token_count}")
Star 4.5k
Vol.106
2 days ago

Python Library for Manipulating Font Files. This is a Python library for editing and converting font files, supporting the interconversion between TrueType and OpenType fonts and XML format (TTX), compatible with a variety of font formats, suitable for scenarios such as font editing, debugging, and optimization.

from fontTools.afmLib import AFM f = AFM("Tests/afmLib/data/TestAFM.afm") print(f["A"]) # (65, 668, (8, -25, 660, 666)) f.FontName = "TestFont HelloGitHub" f.write("testfont-hellogithub.afm")
Star 745
Vol.106
4 days ago

A Tool for Easily Capturing HTTP(S) Requests in Python Programs. This project is a tool designed to assist developers in debugging HTTP(S) requests within Python programs. By running the program with the pyhttpdbg command, one can view the outgoing HTTP requests in a browser, supporting various operation modes including script execution, interactive console, and unit testing.

httpdbg
4
pwndbg
Star 8.1k
Vol.106
4 days ago

GDB/LLDB Plugin Specifically for Reverse Engineering. This is a plugin designed specifically for GDB and LLDB debuggers, supporting features such as register state display, memory search, memory leak detection, and more. It is suitable for scenarios like low-level software development, hardware debugging, and reverse engineering.

pwndbg
5
PyPSA
Star 1.4k
Vol.106
3 days ago

Power System Analysis Python Library. This is a Python library for power system analysis, focusing on modeling and optimization of electric and multi-energy systems. It is based on libraries such as Pandas, NumPy, GLPK, Cbc, and can efficiently calculate optimal power flow (OPF), linear and non-linear electric power flows, and supports simulation of various electric and energy system components.

import pypsa # create a new network n = pypsa.Network() n.add("Bus", "mybus") n.add("Load", "myload", bus="mybus", p_set=100) n.add("Generator", "mygen", bus="mybus", p_nom=100, marginal_cost=20) # load an example network n = pypsa.examples.ac_dc_meshed() # run the optimisation n.optimize() # plot results n.generators_t.p.plot() n.plot() # get statistics n.statistics() n.statistics.energy_balance()
PyPSA
6
grip
Star 6.6k
Vol.105
7 months ago

GitHub README File Local Preview Tool. This is a tool for local preview of GFM (GitHub Flavored Markdown) files. It uses Flask and the GitHub Markdown API to render and display Markdown files with effects identical to those on GitHub in a local environment.

$ cd myrepo $ grip * Running on http://localhost:6419/
Star 1.8w
Vol.105
16 days ago

Xiaomi's Open Source HA Plugin. This project is an open-source Home Assistant integration plugin developed by Xiaomi, enabling seamless integration of Xiaomi IoT smart devices with Home Assistant. It supports device discovery, status synchronization, remote control, and other features.

ha_xiaomi_home
8
pex
Star 3.6k
Vol.105
19 hours ago

Python Project Packaging Tool That You'll Wish You Knew Earlier. This is an open-source Python project packaging tool designed specifically for cross-environment deployment and deployment scenarios where access to the public internet is not available. It can package Python projects and all their dependencies, even the Python interpreter (optional), into a single executable file (.pex), allowing developers to run Python programs directly without the need to install a runtime environment, and supports Linux and macOS systems.

$ pex "uvicorn[standard]" -c uvicorn --inject-args 'example:app --port 8888' -ohellogithub-app.pex $ ./hellogithub-app.pex INFO: Started server process [2014] INFO: Waiting for application startup. INFO: ASGI 'lifespan' protocol appears unsupported. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:8888 (Press CTRL+C to quit) ^CINFO: Shutting down INFO: Finished server process [2014]
Star 2.6k
Vol.105
9 days ago

A Tool for Quickly Obtaining Docker Container Startup Commands. This is a tool for parsing running containers, capable of automatically generating the corresponding 'docker run' startup commands. It can extract configuration information from containers, including port bindings, volume mappings, environment variables, network settings, etc., making it suitable for scenarios requiring replication, debugging, or migration of containers.

$ runlike -p redis docker run \ --name=redis \ -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ -e "REDIS_VERSION=2.8.9" \ -e "REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-2.8.9.tar.gz" \ -e "REDIS_DOWNLOAD_SHA1=003ccdc175816e0a751919cf508f1318e54aac1e" \ -p 0.0.0.0:6379:6379/tcp \ --detach=true \ myrepo/redis:7860c450dbee9878d5215595b390b9be8fa94c89 \ redis-server --slaveof 172.31.17.84 6379
Star 5.9k
Vol.105
4 days ago

Out-of-the-box Python Performance Analysis Tool. This is an efficient and easy-to-use Python program performance analysis tool that helps developers debug code and analyze performance bottlenecks. It is optimized for performance tracking, minimizing the performance impact on the analyzed program as much as possible, and supports timeline tracking, multi-process analysis, and modularized tracking, generating intuitive and interactive analysis reports.

# 安装 pip install viztracer # 生成分析报告 viztracer my_script.py arg1 arg2 # 可视化查看报告 vizviewer result.json
viztracer