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

Резултати

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

Пребарај: #consciousness

当前筛选 #consciousness清除筛选
Self-Immolation

@SelfImmolation · Post #1101 · 20.01.2023 г., 02:52

“The greater and greater awakening of consciousness and its climb to a higher and higher level and a wider extent of its vision and action is the condition of our progress towards that supreme and total perfection which is the aim of our existence.” ~ Sri Aurobindo #consciousness 💖@OfLoveAndGrace💖

Interesting Planet 🌍

@interesting_planet_facts · Post #632 · 26.08.2025 г., 13:22

🌎 The phenomenon of synesthesia allows some people to experience a blending of senses—like seeing colors when hearing music or tasting flavors from words. This rare trait reveals how flexible and interconnected the human brain’s sensory pathways can be. ✨ #neuroscience⚡#consciousness⚡#perception 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1363 · 03.04.2026 г., 12:11

🌎 Humans can perceive their own thoughts by using the brain’s “default mode network” (DMN), a group of regions active during self-reflection and daydreaming. The DMN uses up to 20% of the brain’s total energy when awake. ✨ #brain⚡#consciousness⚡#neuroscience 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1031 · 14.11.2025 г., 12:11

🌎 Consciousness studies reveal that some patients in vegetative states still show minimal awareness. Brain scans detect distinct patterns when they are asked to imagine specific activities. These brain responses resemble those of healthy people, showing hidden layers of awareness even without outward signs. ✨ #brain⚡#consciousness⚡#neuroscience 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #997 · 02.11.2025 г., 12:11

🌎 Brains process language mostly on the left side, but imaging studies reveal that understanding jokes or irony also activates areas on the right. This pattern appears in over 90% of right-handed people. ✨ #brain⚡#neuroscience⚡#consciousness 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #925 · 17.10.2025 г., 18:11

🌎 The phenomenon of "predictive coding" means your brain constantly generates guesses about what's coming next, allowing you to react faster to new information. This system helps you interpret sights, sounds, and even social cues by comparing real signals to expectations, updating your perception in real time. Brain scans show this process is most active in the cerebral cortex. ✨ #brain⚡#neuroscience⚡#consciousness 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #856 · 04.10.2025 г., 12:11

🌎 The brain’s default mode network activates when you daydream or let your mind wander. This network is involved in self-reflection and retrieving personal memories. MRI studies show it consumes nearly as much energy as active, focused thinking. ✨ #brain⚡#consciousness⚡#neuroscience 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #793 · 21.09.2025 г., 18:11

🌎 Locked inside your skull, the human brain contains over 86 billion neurons. These nerve cells communicate through trillions of connections, forming complex circuits that create consciousness. Remarkably, all our thoughts, memories, and perceptions arise from electrical and chemical signals passing between these tiny cells. ✨ #brain⚡#neuroscience⚡#consciousness 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #758 · 16.09.2025 г., 00:22

🌎 The phenomenon called "blindsight" occurs when people with damage to their visual cortex can respond to visual stimuli without conscious awareness. Their eyes and optic nerves work, but the brain's primary visual center is injured—yet they can still guess locations or movements of objects correctly. Studies show blindsight patients perform above chance when identifying light or motion in their blind field. ✨ #brain⚡#consciousness⚡#neuroscience 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #727 · 11.09.2025 г., 03:22

🌎 When you recognize a friend’s face, your brain’s fusiform gyrus handles the task. Damage here can cause prosopagnosia, a condition where people cannot recognize faces—even those of loved ones. ✨ #brain⚡#neuroscience⚡#consciousness 👉subscribe Interesting Planet ​

12
ПретходнаСтраница 1 од 2Следна