Вторая по частоте 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
Решила продать старые ненужные вещи на Авито?
🟢
Но ты не любишь переодеваться, долго фоткать вещи. Вместо этого можно все сделать через нейросеть:
1. Просто фотографируешь вещь прямо на полу, висящими на вешалке и тд.
2. Заходишь в Nano Banana Pro
3. Загружаешь фото своей вещи и вводишь промпт, чтобы получить фото на белом фоне. Делаешь, пока не понравится результат.
Создай каталожное предметное фото [название вещи, лучше подробно описать]
Расположена строго по центру кадра, симметрично, в нейтральном положении.
Фон: чистый белый (#FFFFFF), полностью однородный, без градиентов и текстур.
Свет: ровный студийный, soft light, без жёстких теней и без художественного контраста
4. Дальше заходишь в ChatGPT или Gemini и просишь написать по шаблону промпт для фотосессии этой вещи.
📍Шаблон в первом комментарии!
5. Возвращаешься в Nano Banana Pro. Загружаешь фото по порядку:
- фото товара на белом фоне
- лицо модели
Дальше вводишь промпт и нажимаешь generate
6. Получаешь коллаж и пишешь:
Пришли только фото [номер фото] из [верхнего /
среднего / нижнего] ряда без искажений. Ничего не меняй.
В итоге качественная фотосессия для продажи любой залежавшийся вещи. Обязательно сохрани чтобы не потерять!
➡️AI Вентура | YouTube | MAX
в мире дизайна чистый белый — не всегда лучший выбор. он может казаться слишком ярким и утомлять глаза, особенно если дело касается сайтов или дизайна в социальных сетях.
рассказываем, какие мягкие альтернативы #FFFFFF выбираем сами.
1. Ultra close up editorial photograph of an extremely old, thin, pigmented female hand with short natural nails holding a bitten red velvet cupcake, red crumbs and white cream smeared on fingertips, wearing a hammered sterling silver cuff bracelet with an organic sculptural shape and a raw amethyst stone ring in an oxidized silver claw setting, subtle motion blur, every wrinkle and sun spot in sharp detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
2. Macro editorial shot of a very aged, bony, freckled female hand with short bare nails gripping a half eaten red cupcake, buttercream frosting smudged between fingers, wearing a chunky hand forged silver bangle with a heart scroll design and a large rough cut garnet ring in a blackened silver bezel, slight motion blur, extreme skin texture, 4:5 ratio, isolated on a crisp white background, hex #ffffff
3. Hyper detailed editorial close up of an elderly woman's thin spotted hand with short unpainted nails squeezing a bitten red cupcake, white frosting pressed into her creases, wearing an artisan sterling silver wrap cuff with a twisted vine motif and an oxidized silver ring holding a raw tourmaline crystal, gentle motion blur, veins and tendons fully visible, 4:5 ratio, isolated on a crisp white background, hex #ffffff
4. Extreme editorial macro of a very old, slim, sun damaged female hand with short natural nails cradling a red cupcake with a large bite taken out, cream frosting on her index finger and thumb, wearing a wide hammered silver cuff with an uneven organic edge and a rough cut moonstone ring in a hand wrought silver prong setting, soft motion blur, skin texture at maximum detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
5. Editorial close up photograph of an aged, fragile, pigmented female hand with short bare nails pinching a bitten red cupcake, white icing smeared across her knuckle, wearing a heavy oxidized silver chain link bracelet with an artisan toggle clasp and a large raw labradorite stone ring in a hammered silver setting, slight blur of movement, every age spot captured, 4:5 ratio, isolated on a crisp white background, hex #ffffff
6. Ultra realistic editorial macro of a very elderly woman's bony freckled hand with short natural nails holding a messy bitten red velvet cupcake, swirl of cream frosting on her ring finger, wearing stacked thin hand forged silver bangles with irregular textures and a blackened silver signet ring with a rough ruby cabochon, gentle motion blur, full skin texture, 4:5 ratio, isolated on a crisp white background, hex #ffffff
7. Detailed editorial close up of an extremely old, thin spotted female hand with short unpainted nails gently holding a red cupcake with two bites missing, white frosting smudged on her fingertips, wearing a sculptural sterling silver cuff shaped like an abstract leaf and an oxidized silver ring with a raw citrine crystal in a claw mount, soft movement blur, wrinkles and veins in full detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
8. Hyper close editorial photograph of an aged woman's skinny pigmented hand with short bare nails gripping a crumbling bitten red cupcake, cream icing pressed into her finger creases, wearing a heavy hand hammered silver torque bracelet and a chunky artisan silver ring with a rough aquamarine stone in an open bezel, subtle motion blur, maximum skin texture showing, 4:5 ratio, isolated on a crisp white background, hex #ffffff
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My peace keeper" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Brain quiet, heart full" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My dopamine" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You feel like a nap" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "The antidote" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Chaos canceller" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My stabilizer" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "High value human" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Zero cortisol" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My soft era" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Safe to land" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You make life soft" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My nervous system loves you" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You quiet the noise" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My calm in the chaos" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You recharge me" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "10/10 recommend" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Walking green flag" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You lower my stress" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My human charger" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
Сегодня давайте поговорим про тонировку изображения. Хочется сказать этому обэме, что на кадр нужно смотреть цельно. Учитывать заранее, что в финальной версии поверх шота будет накладываться графика. Если вы не любитель каши в композиции, белый в кадре может быть #FFFFFF только в графике, размещенной поверх кадра. Без фанатизма! Баланс между картинкой и графикой всегда настраивается индивидуально. Как понять, что ок? В любой непонятной ситуации смотрите хорошие рефы и все получится.
Behancega bir keysni taqdimotini tayyorlayapman, #ffffff rangli matn, #E5E5E5 rangda qolib ketgan ekan, o'zgartirib, qaytadan saqlab, yana yuklab qo'ydim. Baribir, uncha muncha kishi e'tibor qilmas edi, taqdimotni ham sifatli ishlash, kerak, taqdimot bu keysni ustki kiymidek gap. Ustingiz chang sozi yuravermaysizku, dizaynerlar, yana ham bilmadim 🤷♂️
🆕 Иногда цвет хочется написать словом вместо выбора через меню, например, red, blue, yellow... И это теперь возможно! Любое стандартное значение цвета из CSS можно написать в поле ввода цвета. Даже такое как “MistyRose”! Они автоматически преобразуются в шестнадцатеричный код цвета. Все цвета можно найти в таблице: https://htmlcolorcodes.com/color-names/#новое
К слову, а ты уже знаешь, что можно не писать весь HEX код цвета, если буквы и цифры в нём повторяются? Например, написав F ты получишь белый #FFFFFF, а 0 — чёрный #000000. Пара символов также будет повторяться: 5A станет #5A5A5A. А вот тройка символов скопирует каждый на отдельные составляющие цвета: “f9a” превратится в #FF99AA. #обучение