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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #76 · 27 апр.

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #neovim

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

@githubtrending · Post #15553 · 10.03.2026 г., 12:00

#lua#github#neovim Octo.nvim lets you edit and review GitHub issues, pull requests, and discussions right in Neovim. Just open with commands like `//github.com/user/repo/issues/1` or `w` to sync changes instantly. Add reactions, labels, assignees, or reviewers easily. This saves time by keeping all GitHub work in your editor—no browser switching—boosting productivity for developers managing repos. https://github.com/pwntester/octo.nvim

GitHub Trends

@githubtrending · Post #15599 · 03.04.2026 г., 11:30

#rust#filesearch#lua#neovim#neovim_plugin#rust FFF is a super-fast fuzzy file finder for AI agents and Neovim users. It excels at grepping, fuzzy matching, and globbing with built-in memory that ranks results by frecency, git status, file size, and more for typo-proof searches. Install easily via script for AI (like Claude) or Lua for Neovim (keys like ff for files, fg for grep). This saves you time and tokens by finding code instantly, skipping useless files, and boosting productivity on big repos. https://github.com/dmtrKovalenko/fff.nvim

GitHub Trends

@githubtrending · Post #14753 · 26.05.2025 г., 12:00

#tree_sitter_query#hacktoberfest#neovim#nvim_treesitter#tree_sitter Nvim-treesitter is a plugin for Neovim that makes it easy to use Tree-sitter, a modern parsing tool, for better syntax highlighting and code understanding in your editor[1][2]. It automatically installs and manages language parsers, so you don’t have to do it manually, and supports many programming languages out of the box. With nvim-treesitter, you get more accurate and faster syntax highlighting, smarter code navigation, and features like incremental selection, indentation, and code folding, all based on the actual structure of your code[4]. This means your code is easier to read and work with, and you can move around and edit code more efficiently. While some features are still experimental, using nvim-treesitter can greatly improve your coding experience in Neovim. https://github.com/nvim-treesitter/nvim-treesitter

GitHub Trends

@githubtrending · Post #14955 · 13.07.2025 г., 13:00

#shell#awesome#awesome_list#neovim#neovim_plugins#nvim_lua Neovim is a powerful, extensible text editor based on Vim, designed for usability and customization. It supports a vast collection of plugins tailored specifically for Neovim features, including plugin managers, language servers (LSP), AI coding assistants, syntax highlighting, fuzzy finders, file explorers, Git integration, debugging tools, and more. These plugins enhance coding productivity by adding features like code completion, project management, smooth navigation, and UI improvements. Using Neovim with these plugins lets you create a personalized, efficient coding environment that can boost your workflow, support many programming languages, and integrate modern tools like AI assistants and debuggers directly into your editor. https://github.com/rockerBOO/awesome-neovim

GitHub Trends

@githubtrending · Post #15096 · 26.08.2025 г., 11:30

#lua#layout#lua#neovim#neovim_plugin#neovim_ui#nvim#plugin#scratchpad#ui#ux#zen_mode#zenmode The no-neck-pain.nvim plugin for Neovim centers your active editing window by adding empty buffers on each side, creating padding that keeps your focus in the middle of the screen. It works right away without setup, supports multiple tabs, split windows, and integrates with popular file tree and dashboard plugins. You can customize its width, colors, and behavior, and even use the side buffers as scratchpads for notes. This helps reduce neck strain and improves focus, especially on wide monitors, by keeping your code or text centered and easy to read without distractions. https://github.com/shortcuts/no-neck-pain.nvim