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

Резултати

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

Пребарај: #firmware

当前筛选 #firmware清除筛选
纯情男高

@hanzichen · Post #1372 · 17.11.2025 г., 18:15

OnePlus Archive OnePlus Archive is a firmware repository for OnePlus phones offering stock OTA images and full firmware packages. It includes archived files for specific partition images to save bandwidth and storage, along with boot/init_boot images for rooting, un-rooting, flashing stock firmware and aftermarket development purposes. 🔗 Links: - GitHub repo Developer: Spike ❤️ Support the Project If this project makes your life easier, here are a few quick ways to show some love: ⭐ Star the repo/app ☕ Buy a coffee for the developer 🛠 Contribute code, issues, or pull-requests 🏷 Tags: #Android#OnePlus#Firmware

Oneplus 13 Updates

@OnePlus13Series · Post #349 · 13.11.2025 г., 15:52

Oneplus Archive This project provides official, unmodified OnePlus stock firmware images for supported models, ideal for rooting, flashing custom ROM(s) and more ⚙️ Repo Link: Here 👤 Maintainer: Spike & Team #oneplus#firmware#boot#otaimage#root

GitHub Trends

@githubtrending · Post #15033 · 06.08.2025 г., 12:00

#shell#buildroot_external_tree#firmware#ingenic#ip_camera#ipc#ipcamera Thingino is free, open-source firmware designed specifically for IP cameras using Ingenic SoC chips. It customizes the software to fit each supported camera model, making the camera easier to use and more efficient. You can build the firmware yourself using the provided instructions and tools, and there is a helpful web interface to control camera features like pan, tilt, night mode, and streaming. This gives you more control and flexibility over your camera without relying on proprietary software. It supports many camera models, and the community offers resources like a wiki, chat groups, and development guides to help you get started and customize your device. This benefits you by providing a customizable, transparent, and community-supported alternative to closed camera firmware. https://github.com/themactep/thingino-firmware