mmh3 项目使用教程
2024-08-19 17:58:11作者:董宙帆
1. 项目的目录结构及介绍
mmh3 项目的目录结构如下:
mmh3/
├── docs/
├── src/
│ └── mmh3/
├── tests/
├── util/
├── .clang-format
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── LICENSE
├── MANIFEST.in
├── README.md
├── pyproject.toml
└── setup.py
目录介绍
- docs/: 存放项目文档的目录。
- src/mmh3/: 存放 mmh3 源代码的目录。
- tests/: 存放测试文件的目录。
- util/: 存放工具文件的目录。
- .clang-format: 用于代码格式化的配置文件。
- .gitignore: 指定 Git 忽略的文件和目录。
- .gitmodules: 用于管理子模块的配置文件。
- .readthedocs.yaml: 用于配置 Read the Docs 的文件。
- LICENSE: 项目的许可证文件。
- MANIFEST.in: 指定打包时包含的文件。
- README.md: 项目说明文件。
- pyproject.toml: 项目配置文件,用于构建工具。
- setup.py: 用于安装和打包项目的脚本。
2. 项目的启动文件介绍
mmh3 项目的启动文件主要是 setup.py。这个文件用于安装和打包项目。以下是 setup.py 的主要内容:
from setuptools import setup, Extension
module1 = Extension('mmh3',
sources = ['src/mmh3.cpp'],
include_dirs = ['src'],
extra_compile_args=['-std=c++11'])
setup(name = 'mmh3',
version = '3.0.0',
description = 'Python wrapper for MurmurHash (MurmurHash3)',
ext_modules = [module1],
author='Hajime Senuma',
author_email='hajime.senuma@gmail.com',
url='https://github.com/hajimes/mmh3',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development :: Libraries :: Python Modules',
],
python_requires='>=3.8',
)
启动文件介绍
- setup.py: 这个文件定义了如何安装和打包 mmh3 项目。它包含了项目的名称、版本、描述、作者、许可证等信息,并且定义了扩展模块
mmh3的源文件和编译选项。
3. 项目的配置文件介绍
mmh3 项目的配置文件主要是 pyproject.toml 和 .readthedocs.yaml。
pyproject.toml
pyproject.toml 文件用于配置构建工具。以下是 pyproject.toml 的主要内容:
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
.readthedocs.yaml
.readthedocs.yaml 文件用于配置 Read the Docs。以下是 .readthedocs.yaml 的主要内容:
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt
配置文件介绍
- pyproject.toml: 这个文件定义了构建系统所需的工具和后端。它指定了
setuptools和wheel作为构建工具,并使用setuptools.build_meta作为构建后端
登录后查看全文
热门项目推荐
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0214
cann-learning-hubCANN 学习中心仓,支持在线互动运行、边学边练,提供教程、示例与优化方案,一站式助力昇腾开发者快速上手。Jupyter Notebook0138
uni-appA cross-platform framework using Vue.jsJavaScript08
GLM-5.2智谱开源 GLM-5.2,这是针对长文本任务的最新旗舰模型。相较于前代产品 GLM-5.1,它在长文本任务处理能力上实现了显著飞跃,并且首次在稳定的 100 万 token 上下文中提供这一能力。Jinja00
SwanLab⚡️SwanLab - an open-source, modern-design AI training tracking and visualization tool. Supports Cloud / Self-hosted use. Integrated with PyTorch / Transformers / LLaMA Factory / veRL/ Swift / Ultralytics / MMEngine / Keras etc.Python00
tiny-universe《大模型白盒子构建指南》:一个全手搓的Tiny-UniverseJupyter Notebook03
项目优选
收起
deepin linux kernel
C
32
16
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
469
465
暂无描述
Dockerfile
778
5.08 K
本项目是CANN提供的transformer类大模型算子库,实现网络在NPU上加速计算。
C++
877
2.03 K
Ascend Extension for PyTorch
Python
758
968
本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。
C++
697
1.4 K
昇腾LLM分布式训练框架
Python
185
231
本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。
C++
1.1 K
1.14 K
本仓库是 Flutter SDK 与 Flutter Engine 的 OpenHarmony 适配版本,由 CPF-Flutter 团队维护。开发者可使用熟悉的 Flutter 技术栈开发 OpenHarmony 应用,3.35.7 及以后的适配版本可基于本仓库源码构建支持 OpenHarmony 的 Flutter Engine。
Dart
1.04 K
271
JiuwenSwarm 是一款基于openJiuwen开发的智能AI Agent,它能够将大语言模型的强大能力,通过你日常使用的各类通讯应用,直接延伸至你的指尖。
Python
2.25 K
677