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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #ros2

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

@githubtrending · Post #15156 · 20.09.2025 г., 13:00

#python#llm#multiagent#robotics#ros2#zenoh OpenMind's OM1 is an open-source, modular AI system that lets you build and control smart robots like humanoids, quadrupeds, and educational bots. It works with many types of sensors (cameras, LIDAR, web data) and supports physical actions like moving and talking. OM1 is easy to use with Python, supports many hardware platforms via plugins, and offers tools for debugging and voice/vision AI integration. You can quickly create custom AI agents that interact naturally and upgrade them for different robots. This helps you develop advanced, human-friendly robots that can navigate, communicate, and perform tasks autonomously or with your commands. It runs on common platforms and supports full autonomy with real-time mapping and control. This system benefits you by simplifying robot development, enabling flexible AI-powered behaviors, and supporting a wide range of hardware and applications. https://github.com/OpenMind/OM1

GitHub Trends

@githubtrending · Post #15616 · 15.04.2026 г., 12:00

#cplusplus#hap#mid_360#ros#ros2 Livox ROS Driver 2 connects your Livox LiDARs like HAP and Mid360 to ROS (Noetic) or ROS2 (Foxy/Humble/Jazzy) on matching Ubuntu versions. Clone the repo in a workspace/src folder, build Livox-SDK2, then run ./build.sh with your ROS version, and launch with roslaunch or ros2 launch files from launch_ROS1/ROS2 folders—edit JSON configs for IP, ports, frequency (up to 100Hz), and formats. This lets you quickly test and visualize point clouds in RViz for robotics development, saving time on setup and debugging. https://github.com/Livox-SDK/livox_ros_driver2

GitHub Trends

@githubtrending · Post #15225 · 15.10.2025 г., 13:00

#mdx#bilateral_teleoperation#force_feedback#genesis#gravity_compensation#humanoid_robot#imitation_learning#machine_learning#moveit2#mujoco#open_source#openarm#python#reinforcement_learning#robot#robot_arm#robotics#ros2#teleoperation OpenArm is a special robot arm that helps with physical AI research. It has 7 degrees of freedom, which means it can move like a human arm. This makes it good for tasks that involve touching or moving things safely around people. The robot is open-source, meaning anyone can build, modify, and use it. This is helpful because it makes advanced robotics available to more people, like researchers and students, without costing too much. A complete system with two arms costs about $6,500, which is much cheaper than similar robots. https://github.com/enactic/openarm