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

Резултати

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

Пребарај: #webgl2

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

@githubtrending · Post #14898 · 02.07.2025 г., 13:30

#javascript#3d#augmented_reality#canvas#html5#javascript#svg#virtual_reality#webaudio#webgl#webgl2#webgpu#webxr Three.js is a powerful and easy-to-use JavaScript library that helps you create 3D graphics and animations on the web with much less code than using WebGL directly. It handles complex tasks like rendering and math calculations, so you can focus on designing your 3D scenes. It supports WebGL and WebGPU, with additional options like SVG and CSS3D. Three.js has excellent documentation, many examples, and a large, active community that provides support and updates. This makes it ideal for quickly building interactive 3D content that works across browsers, improving your web projects with engaging visuals and smooth performance[1][3][5]. https://github.com/mrdoob/three.js

GitHub Trends

@githubtrending · Post #15296 · 12.11.2025 г., 13:30

#javascript#3d_gaussian_splatting#game_development#game_engine#gamedev#gaussian_splatting#gltf#hacktoberfest#javascript#nodejs#playcanvas#typescript#virtual_reality#webgl#webgl2#webgpu#webxr PlayCanvas is an open-source game engine that lets you create 3D and 2D games or apps that run in any browser, using WebGL and WebGPU for fast, high-quality graphics. It supports advanced features like animation, physics, sound, and asset streaming, and you can write code in JavaScript or TypeScript. The engine is free, easy to set up, and works well for both simple projects and complex games, making it simple to build and share interactive content online. https://github.com/playcanvas/engine