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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #microcontroller

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

@githubtrending · Post #14657 · 01.05.2025 г., 14:30

#c_lang#embedded#filesystem#microcontroller LittleFS is a file system designed for small devices like microcontrollers. It helps keep your data safe even if the power goes off suddenly. This is because it uses a "copy-on-write" system, which means it doesn't overwrite old data until the new data is safely stored. LittleFS also helps extend the life of your storage by spreading out writes across different areas, a process called wear leveling. This makes it very reliable and efficient for devices with limited memory and storage. https://github.com/littlefs-project/littlefs

GitHub Trends

@githubtrending · Post #14879 · 28.06.2025 г., 14:30

#cplusplus#cpp#hacktoberfest#iot#iot_device#iot_edge#microcontroller#microsoft_for_beginners#python#raspberry_pi#rpi You can learn the basics of the Internet of Things (IoT) through a free 12-week course with 24 lessons that guide you step-by-step in building real projects like plant monitoring, vehicle tracking, and smart cooking timers. Each lesson includes quizzes, instructions, challenges, and solutions to help you understand sensors, cloud connections, security, and AI on devices. The course uses real hardware or virtual options, making it easy to practice hands-on skills. This project-based learning helps you gain practical IoT knowledge useful for many industries, improving your tech skills and job readiness. https://github.com/microsoft/IoT-For-Beginners

GitHub Trends

@githubtrending · Post #14878 · 28.06.2025 г., 14:00

#cplusplus#arduino#cansat#csv#embedded#graph#ground_station#iot#microcontroller#network#projects#qt#serial#serial_studio Serial Studio is a free, easy-to-use tool that lets you visualize real-time data from devices like microcontrollers via serial ports, Bluetooth, or network connections. It works on Windows, macOS, and Linux, and offers customizable dashboards with various widgets to monitor sensor data, debug info, or telemetry. You can quickly plot data, export it as CSV for analysis, and even use advanced features like checksum validation and JavaScript data processing. It supports hobbyists, educators, and professionals by simplifying data monitoring and debugging, saving you time and effort in understanding your device’s output. Pro versions add commercial use and extra features[1][4][5]. https://github.com/Serial-Studio/Serial-Studio

GitHub Trends

@githubtrending · Post #14989 · 23.07.2025 г., 11:30

#c_lang#bluetooth#bluetooth_le#embedded#embedded_c#iot#mcu#microcontroller#real_time#rtos#zephyr#zephyr_rtos#zephyros Zephyr is a free, open-source real-time operating system (RTOS) designed for small, resource-limited devices like sensors, wearables, and IoT gateways. It supports many hardware types such as ARM, Intel x86, and RISC-V, making it flexible for different projects. Zephyr is modular, so you can include only what you need, saving memory and power. It focuses on security with features like memory protection and secure boot. It also offers built-in networking and tools for easy development and testing. This helps you build reliable, fast, and secure embedded systems efficiently, especially for IoT and real-time applications[1][2][3]. https://github.com/zephyrproject-rtos/zephyr