Ep 40. Rust 和 PyO3:让 Python 再次伟大 🦀 ❤️ 🐍

嘉宾 Messense 主播 * laixintao * 小白 * Adam Wen * laike9m 链接 * PyO3 * PyO3 有哪些应用? * polars: Fast multi-threaded DataFrame library in Rust | Python | Node.js. * pydantic-core: Core validation logic for pydantic written in Rust. * cryptography: Python cryptography library with some functionality in Rust. * orjson: Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy * PyO3 前身:rust-cpython * Maturin: Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages * What Are Python Wheels and Why Should You Care? * PEP 517 – A build-system independent format for source trees * Ruff: An extremely fast Python linter, written in Rust. * typos: Source code spell checker * ChatGPT 写的 Rust 调用 Python C-API 的例子 use std::os::raw::{c_char, c_int}; use std::ffi::CString; use libc::{c_double, c_void}; #[link(name = "python3.8")] extern "C" { fn Py_Initialize(); fn Py_Finalize(); fn Py_BuildValue(format: *const c_char, ...) -> *mut c_void; } fn main() { unsafe { // 初始化 Python 解释器 Py_Initialize(); // 构建一个 Python 元组对象,并打印它 let x = 1.23 as c_double; let y = 4.56 as c_double; let format = CString::new("dd").unwrap().as_ptr(); let result = Py_BuildValue(format, x, y); let s = CString::from_raw(result as *mut c_char).into_string().unwrap(); println!("{}", s); // 关闭 Python 解释器 Py_Finalize(); } } * pyo3-ffi: Python-API bindings for the PyO3 ecosystem * 在 PyO3 里通过 allow_threads 关掉 Python GIL * pybind11 — Seamless operability between C++11 and Python * Cython * CFFI: C Foreign Function Interface for Python. Interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation. * zig cc: a Powerful Drop-In Replacement for GCC/Clang * wechatpy: 微信公众平台第三方 Python SDK * OrbStack: Fast, light, simple Docker & Linux on macOS * FancyWM - a dynamic tiling window manager for Windows 10/11 * CSAPP: Computer Systems: A Programmer's Perspective * APUE: Advanced Programming in the UNIX® Environment * 提到的读书撕书的灵感来自于:李敖先生 * 吴恩达 prompt engineering 课程: ChatGPT Prompt Engineering for Developers * Kiwi 浏览器 爱发电上赞助

77分钟
2k+
1年前

Ep 39. 和 Alex 聊聊向量数据库与职业规划

[赞助logo] 如果喜欢我们的节目,欢迎通过爱发电打赏支持:https://afdian.net/@pythonhunter 嘉宾 * Alex 主播 * 小白 * laike9m 时间轴 * 00:00:30 开场 * 00:00:59 嘉宾自我介绍 * 00:02:55 [第一部分]向量数据库 milvus 简介 * 00:07:35 向量数据库的「向量」代表什么以及其应用场景 * 00:14:16 原始数据到向量数据的转化 * 00:15:42 不同方式产生的向量数据格式是否相同、能否混用 * 00:19:04 milvus 存储向量数据的方式以及应用场景描述 * 00:25:59 怎样利用 milvus 进行向量数据查找 * 00:27:46 向量数据库存在的必要性 * 00:33:56 milvus 商业化道路讨论 * 00:41:57 [第二部分]嘉宾加入当前公司的契机是什么 * 00:52:54 在三类不同阶段的公司工作分别的工作体验是怎样的 * 00:53:41 小白:未融资的初创公司 * 00:57:39 Alex:已经融资进入正轨的创业公司 * 01:04:02 laike9m:Google * 01:08:30 Alex:one more thing * 01:12:13 好物分享 * 01:17:04 结语 相关链接 * 00:00:47 zilliz * 00:00:53 milvus * 00:04:26 milvus start history in github * 00:06:04 Facebook(Meta) faiss * 00:06:21 Elasticsearch * 00:06:24 Lucene * 00:06:47 Google scann * 00:06:50 Microsoft DiskANN * 00:09:11 Embedding 维基百科 | 国内网络中没有找到权威解释这里引用一篇博文 embedding 的原理及实践 * 00:10:03 以图搜图 | 百度搜图 | Google 的话在 goole.com 的搜索栏旁边有一个相机的图标点击就能使用 * 00:14:50 Hugging Face * 00:14:58 towhee * 00:36:22 Databricks * 00:45:47 B站:李自然说 * 01:04:23 A career ending mistake * 01:12:37 AnimeGANv2 * 01:14:48 nintendo switch sports * 01:16:35 古明地觉-博客园 | 里面有公众号的图片 | 古明地觉-知乎 爱发电上赞助

78分钟
2k+
2年前
EarsOnMe

加入我们的 Discord

与播客爱好者一起交流

立即加入

播放列表

自动播放下一个

播放列表还是空的

去找些喜欢的节目添加进来吧