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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #273 · 26 јул.

В стандартном модуле random есть две очень похожие функции random.randint() random.randrange() Обе возвращают случайное значение из указанного диапазона >>> random.randint(10, 20) 12 >>> random.randrange(10, 20) 17 В чем же отличие? Дело в том что у randrange() есть третий параметр step. randint() действительно возвращает случайное число из указанного диапазона. randrange() на первый взгляд делает тоже самое если передать также два параметра. Но есть указать еще и step то наш диапазон усложняется, то есть в него попадёт не полный ряд значений. Например, я хочу получить случайное значение из диапазона но только чётное число. Тогда достаточно сделать так: >>> randrange(10, 20, 2) 16 Таким образом получается что randint это частный случай randrange без указания параметра step. Еще одно важное отличие в том, что randint() включает в диапазон второе значение а randrange() нет. То есть выражение randrange(10, 20) никогда не вернёт 20, а randint(10, 20) вернёт. #tricks#basic

Резултати

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

Пребарај: #avx

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

@githubtrending · Post #14788 · 05.06.2025 г., 00:00

#cplusplus#avx#avx_512#avx_instructions#avx2#avx512#intrinsics#neon#simd#simd_instructions#simd_intrinsics#simd_library#simd_parallelism#simd_programming#sse42#wasm Highway is a C++ library that helps make software run faster and use less energy. It does this by using SIMD (Single Instruction, Multiple Data) instructions, which let the CPU perform the same operation on many pieces of data at once. This can make programs up to 10 times faster and reduce energy use by up to five times. Highway works on many different types of computers and is easy to use, making it a good choice for developers who want to improve their software's performance. https://github.com/google/highway

GitHub Trends

@githubtrending · Post #14919 · 06.07.2025 г., 12:00

#cplusplus#aes#avx#avx_instructions#chrome#chrome_devtools#chromedriver#chromium#chromium_browser#content_shell#jpeg_xl#jpegxl#jxl#libjxl#linux#thorium#thorium_browser#thoriumos#web_browser#web_platform#webbrowser Thorium is a fast, optimized web browser based on Chromium, designed to work well on modern CPUs with advanced instruction sets like AVX and SSE4. It offers better performance than standard Chromium and Chrome, opening tabs and rendering pages quickly. Thorium includes enhanced privacy features such as DNS over HTTPS and Do Not Track enabled by default, plus support for modern media formats like HEVC and JPEG XL. It keeps the familiar Chrome interface and supports all Chrome extensions, making it easy to switch. Available on Windows, Linux, macOS, Android, and Raspberry Pi, it suits users wanting speed, privacy, and compatibility across devices[3][5][1]. https://github.com/Alex313031/thorium