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

Резултати

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

Пребарај: #license

当前筛选 #license清除筛选
秋城落叶InjectLib项目

@qiuchenlymac · Post #1056 · 01.12.2025 г., 09:58

借助AI辅助, 我很高兴的宣布, QiuChenStore将在下个迭代中正式推出Adobe产品安装、激活。 其中激活算法彻底重写,不再依赖于每个版本手动修补程序中的特定代码来尝试绕过激活,我们从底层实现了整套的RSA 以及 SHA256、SHA512加解密与使用来自QiuChenly生成的根证书来为每一个授权用户激活授权请求。 我们成功使用伪造的自签名根证书下发有效证书授权。 我还重写了整套Adobe产品安装系统。 现在不需要官方ACC,你可以随意最精简化安装所有App,而不必担心在您的Mac中随处产生文件。 选择一个文件夹,所有的Adobe数据全都存在于此。 您甚至可以把所有的Adobe App安装到移动硬盘中,一插一拔中随身带走你的adobe 软件、用户首选项、Adobe缓存和用户数据,这一切都基于QiuChenAdobe全新安装系统的魔法。 除此之外,我们还试图解决一个遗留已久的问题:神经滤镜(Neural filter)。 神经滤镜的模型、蒙版实际上是登录用户即可下载,而不必你真的拥有授权。目前来看是Adobe官方的逻辑Bug,因为Adobe产品使用之前必然需要授权许可,所以Adobe目前还没有采取行动来阻止下载。 现在我们可以手动从官网登录,复制token并设置到App中,App即可正常下载滤镜、更新蒙版。具体说明在讨论区原帖中有图例。 各产品适配进度请访问商店的Adobe产品区。 此外致谢: 一位匿名人士无偿提供的几乎不限量的sonnet 4.5 API 一位匿名人士无偿提供的不限量token cursor 账户 本算法完全基于美元烧出来的。 #Adobe#License

djangoproject

@djangoproject · Post #482 · 30.10.2017 г., 18:53

https://github.com/scottwoodall/django-react-template/blob/master/LICENSE scottwoodall/django-react-template is licensed under the #MIT#License A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Hashtags

djangoproject

@djangoproject · Post #481 · 30.10.2017 г., 14:23

https://github.com/scottwoodall/django-react-template/blob/master/LICENSE scottwoodall/django-react-template is licensed under the #MIT#License A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Hashtags

djangoproject

@djangoproject · Post #598 · 24.04.2018 г., 02:56

https://github.com/Djeact/Djeact-RoadMap What is Djeact? The name of Djeact comes from the combination of Django and React. Django is a python web framework and React is a javascript library for building user interfaces. Djeact is a set of libraries which the backend is written by django and the UI is written with react. Following libraries have been written so far: Why #Djeact started? Why #Django was chosen for #backend? Why #React was chosen for #frontend? Why #MIT#License?

djangoproject

@djangoproject · Post #513 · 30.11.2017 г., 22:00

#AI#Artificial_Intelligence #AJAX #aiohttp #Anaconda #AngularJS #API #Atom #AWS #asyncio (#Asynchronous) #audio #automated_testing #automation #atexit #BeeWare #Big_Data #bitcoin #blockchain #Bluemix #Brython #button #Celery #client #class #classmethod #concurrency #Coroutine #cron #CSS #curl #data_analysis #data_mining #data_processing #database #Deep_Learning#deep_learning #Debian #decorator #deploy #dict #dispatch #django #django_cms #Django_REST_Framework #dropdownbox #Docker #event #Firefox #Flask #form #functions #Generator #GeoDjango #git #Google #GPU #GUI #Gym #host #HTML #httplib #learn #Image_processing #intelligence #input #Instagram #IOT #iPython #Jupyter #lambda #learn #License #Linux #lists #machine_learning #Magenta #map #Matplotlib #Metaprogramming #Micro_services #Micropython #mind #monitoring #MongoDB #modules #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #network #neural_network #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PyPI #PyQt #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #Raspberry_Pi #React #Redis #random #request #Regular_Expressions (#re) #REST #RSS #satellite #scikit_learn #SciPy #scrapy #searching #selectbox #Selenium #serialization #server #sessions #single_responsibility_principle #socket #Spark #str #submit #task #telegram #template #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #unit_test #urllib #upload #uWSGI #Web #WSGI