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

Резултати

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

Пребарај: #jamstack

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

@githubtrending · Post #14762 · 30.05.2025 г., 00:00

#html#bootstrap#devcontainer#html5#jamstack#jekyll#jekyll_theme#pwa#responsive_web_design#rubygems The Chirpy Jekyll theme is a simple and powerful tool for creating websites, especially for technical writing. It offers many features like dark mode, categories, syntax highlighting, and built-in search. This theme helps users create visually appealing sites with ease, making it ideal for sharing knowledge and ideas. It also supports mathematical expressions and diagrams, which is beneficial for technical content. Additionally, it is optimized for SEO and performance, ensuring your site is easily found and runs smoothly. https://github.com/cotes2020/jekyll-theme-chirpy

GitHub Trends

@githubtrending · Post #14937 · 09.07.2025 г., 14:30

#typescript#api#cms#cms_framework#content_management#content_management_system#customizable#dashboard#graphql#hacktoberfest#headless_cms#jamstack#javascript#koa#koa2#mysql#no_code#nodejs#rest#strapi#typescript Strapi is a free, open-source headless content management system that lets you manage content easily and flexibly, whether you host it yourself or use Strapi Cloud. It works with many databases and lets you build custom APIs, routes, and plugins to fit your needs. You can use any frontend technology you like, such as React, Vue, or Angular, and it comes with a modern, customizable admin panel. Strapi is fast, secure, and scalable, making it simple to deliver content across websites, apps, or devices. This means you get full control over your content and how it’s displayed, saving time and effort while keeping your project future-proof[1][2][3]. https://github.com/strapi/strapi

GitHub Trends

@githubtrending · Post #14913 · 03.07.2025 г., 16:30

#typescript#boilerplate#boilerplate_code#jamstack#javascript#js_boilerplate#netlify_template#next_js#next_theme#nextjs#nextjs_starter#nextjs_template#react#react_boilerplate#reactjs#starter_kit#starter_project#starter_template#tailwind_css#tailwindcss#typescript You can quickly start a modern web project using a ready-made Next.js boilerplate that includes the latest Next.js 15 features, Tailwind CSS 4, and TypeScript. It offers built-in user authentication, multi-language support, type-safe database tools, error monitoring, AI code reviews, and security features like bot protection. The setup is easy with local and remote database options, automatic testing, and deployment guides. This saves you time and effort by providing a flexible, production-ready foundation with best practices, letting you focus on building your app instead of configuring tools and infrastructure. It also supports smooth development with live reload and VSCode integration. https://github.com/ixartz/Next-js-Boilerplate