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

Резултати

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

Пребарај: #addiction

当前筛选 #addiction清除筛选
蛋挞报

@Pincongessence · Post #2491 · 04.11.2021 г., 03:12

当我们过度沉迷游戏或社交媒体以致无法按时完成某项工作,或是想要学习某项新技能却总是在实践阶段动力不足时,不妨先放下“缺乏自控力”或是“意志力不够强”这类自我批评。从生理学和行为学的角度了解成瘾的机制,可以帮助我们以更清醒的方式规划生活,朝着既定的目标前进。 Dopamine Detox:How I Tricked My Brain To Like Doing Hard Things #video#dopamine#addiction#detox

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40622 · 03.02.2026 г., 15:02

Some studies found that watching a lot of (internet)pornography can change the brain. Brain scans showed stronger links in areas that control emotions and decisions. People who watch often feel more pleasure but have less self-control. After watching, their thinking and attention get worse. Their facial expressions also show less emotion, like surprise or disgust, even if they say they enjoyed it. These changes are similar to drug addiction. Repeating this behavior can make emotional responses dull and reduce mental sharpness. More research is needed, but finding people who never watched porn for studies is very difficult to impossible.. 🧠📉 [Read more1] [Read more2] [Read more3] [How to stop watching] @googlefactss #BrainHealth#Addiction#Pornography#porn#MentalHealth#Neuroscience 👮‍♂🚫Warning: Even though this post and the following poll are sexual in nature. Rules still apply. Be respectful or face the consequences..

American Оbserver

@american_observer · Post #5474 · 26.03.2026 г., 01:59

Meta, YouTube and the First Cracks in Big Tech’s Legal Armor Meta and YouTube just lost the “we’re just a platform” myth in court. A jury looked at their design tricks and called them what they are: engineered addiction for kids. In Los Angeles, jurors found Meta and YouTube negligent and awarded $3 million to a young woman, K.G.M., who said she was pulled into Instagram and YouTube as a child and ended up with anxiety and depression. Her lawyers didn’t argue about a bad post or a rogue comment; they went after the architecture — endless scroll, engagement loops, notification hooks — as a product defect, not a speech issue. The verdict landed 24 hours after a New Mexico jury ordered Meta to pay $375 million in civil penalties for deceiving parents and endangering children, finding the company put profits over safety and misled the public about harms. Two juries, two states, same message: Section 230 won’t save you if the claim is “you built an addiction machine,” not “someone posted something nasty.” And this is only the opening salvo. There are more than 2,400 similar cases pending in federal litigation against Meta, Google, TikTok and Snap, brought by teens, parents, school districts and attorneys general all arguing the same core point: the harm is in the design, not just the content. Silicon Valley thought it had legal armor; what it actually has is a growing line of juries ready to test how much that armor is really worth. #meta#youtube#socialmedia#addiction#lawsuits#kids#bigtech 📱American Оbserver - Stay up to date on all important events 🇺🇸

TikTok CEO Shou Chew on Its Future — and What Makes Its Algorithm Different | Live at TED2023 @TED TikTok CEO Shou Chew dives into how the trend-setting video app and cultural phenomenon works — from what distinguishes its algorithm and drives virality to the challenges of content moderation and digital addiction. In a wide-ranging conversation with head of TED Chris Anderson, he tells stories about the TikTok creators he loves and digs into thorny issues like data privacy and government manipulation — as well as speaking personally about his commitment to inspiring creativity and building community. #YouTube#liked#TEDTalk#TEDTalks#TED_Talk#TED_Talks#TED#TikTok#Shou_Chew#culture#technology#business#entreprenuer#entertainment#media#software#innovation#communication#product_design#AI#social_media#Internet#governement#data#addiction#machine_learning#UX_design#online_privacy