TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #281 · 18 авг.

Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳 Действительно, что означают цифры которые мы получили в прошлом посте? Это кодировка, заключающая в себе режимы доступа к файлу. Подробней можно почитать в статье про chmod. Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение. Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция >>> stat.filemode(0o755) '?rwxr-xr-x' Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров. А что за знак вопроса в начале? Давайте передадим в эту функцию необрезанное значение от os.stat >>> stat.filemode(os.stat(path).st_mode) 'drwxr-xr-x' Это данные, которые мы безжалостно обрезали в прошлый раз😼 Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l). Вот простая схема данной кодировки [1][3][3][3] │ │ │ │ │ │ │ └──> Others Permissions │ │ └─────> Group Permissions │ └────────> Owner Permissions └───────────> File Type (разверните экран если вы с телефона) Если вы попробуете получить пермишены для симлинка то получите пермишены для файла >>> path = '.venv/bin/python3' >>> stat.filemode(os.stat(path).st_mode) '-rwxr-xr-x' Чтобы получить свойства именно симлинка, нужно это явно указать >>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode) 'lrwxrwxrwx' #tricks#basic

Резултати

Пронајдени 2 слични објави

Пребарај: #faiss

当前筛选 #faiss清除筛选
GitHub Trends

@githubtrending · Post #15295 · 11.11.2025 г., 17:00

#python#ai#faiss#gpt_oss#langchain#llama_index#llm#localstorage#offline_first#ollama#privacy#python#rag#retrieval_augmented_generation#vector_database#vector_search#vectors LEANN is a tiny, powerful vector database that lets you turn your laptop into a personal AI assistant capable of searching millions of documents using 97% less storage than traditional systems without losing accuracy. It works by storing a compact graph and computing embeddings only when needed, saving huge space and keeping your data private on your device. You can search your files, emails, browser history, chat logs, live data from platforms like Slack and Twitter, and even codebases—all locally without cloud costs. This means fast, private, and efficient AI-powered search and retrieval on your own laptop. https://github.com/yichuan-w/LEANN

GitHub Trends

@githubtrending · Post #15168 · 25.09.2025 г., 12:30

#python#ai#context#embedded#faiss#knowledge_base#knowledge_graph#llm#machine_learning#memory#nlp#offline_first#opencv#python#rag#retrieval_augmented_generation#semantic_search#vector_database#video_processing Memvid lets you store millions of text pieces inside a single MP4 video file using QR codes, making your data 50-100 times smaller than usual databases. You can search this video instantly in under 100 milliseconds without needing servers or internet after setup. It works offline, is easy to use with simple Python code, and supports PDFs and chat with your data. The upcoming version 2 will add features like continuous memory updates, shareable capsules, fast local caching, and better video compression, making your AI memory smarter, faster, and more flexible. This means you get a powerful, portable, and efficient way to manage and search huge knowledge bases quickly and easily. https://github.com/Olow304/memvid