TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #1088 · 29.04

Нейросеть очень не любит соблюдать DRY, поэтому её частенько нужно заставлять отдельной командой обернуть повторяющуюся логику в методы, вынести константы в конфиги итд. Но вот еще забавная вещь. Я тут делаю софт для чтения данных по ModbusRTU, и кодом на питоне эмулирую устройство, чтобы читать его потом кодом на сишарпе. У устройства есть 16-битные регистры. Если нужно записать int32 или float, используются два последовательных регистра. В общем, пишу в эмулятор, а при чтении какая-то чушь, все числа другие. Поменял порядок байт, всё равно чушь. Несколько часов отладки. Описываю нейросети проблему, она всякое пытается сделать, и нифига. В основном тоже байты местами меняет, то туда, то обратно. Нет результата. Потом я вычитал сразу пару десятков регистров подряд и вижу, что они смещены на единицу. Проверил: и правда, в эмуляторе пишешь в регистр 2277, а при чтении это число в регистре 2278. Проверил внешней программой: ошибка именно в эмуляторе, читается правильно. Лезу в гитхаб той питоновой библиотеки, которую нейросеть предложила. Нахожу старый закрытый issue с такой же жалобой, а там в ответ: "as intended due to historical reasons...". Сетка даже предположить не могла, что кожаные мешки просто хрень сделали. Даже не смотрела в эту сторону, с её точки зрения библиотека должна была работать без ошибок. Так что пока нейронки не могут, так сказать, думать за пределами коробки, а мы можем. Но когда-нибудь научатся, конечно. #dev

Hashtags

Резултати

Намерени 4 подобни публикации

Търсене: #processes

当前筛选 #processes清除筛选
Amazing Geography 🌍

@amazingeo · Post #647 · 25.02.2026 г., 20:31

🌍 Submarine hydrothermal vents on the ocean floor release superheated water and minerals, fueling unique ecosystems powered by chemical energy instead of sunlight. ✨ #processes⚡#ocean⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #39 · 13.08.2025 г., 00:12

🌍 Earth's crust is in constant motion due to convection currents—slow, swirling movement of hot rock deep below the surface. This drives plate movement, causing earthquakes and forming new land. ✨ #processes⚡#plate⚡#tectonics⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

djangoproject

@djangoproject · Post #290 · 04.04.2017 г., 21:36

https://pymotw.com/3/asyncio/executors.html Combining Coroutines with Threads and Processes A lot of existing libraries are not ready to be used with #asyncio natively. They may block, or depend on concurrency features not available through the module. It is still possible to use those libraries in an application based on asyncio by using an #executor from #concurrent.futures to run the code either in a separate thread or a separate process. #Threads The #run_in_executor() method of the event loop takes an executor instance, a regular callable to invoke, and any arguments to be passed to the callable. It returns a Future that can be used to wait for the function to finish its work and return something. If no executor is passed in, a #ThreadPoolExecutor is created. This example explicitly creates an executor to limit the number of worker threads it will have available. #Processes A ProcessPoolExecutor works in much the same way, creating a set of worker #processes instead of threads. Using separate processes requires more system resources, but for computationally-intensive operations it can make sense to run a separate task on each CPU core. #learn