TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #210 · 3 фев.

Что делать если нужно поставить какую-то Python-библиотеку а root-прав нет? То есть в систему библиотеку никак и ничего не поставить. Есть как минимум два способа это решить правильно! 🔸 Сделать виртуальное окружение и ставить там что угодно. Это позволит создать полностью независимое исполняемое окружение для ваших приложений. Все библиотеки будут храниться в домашней директории юзера а значит доступ на запись имеется. Создать очень просто: python3 -m venv ~/venvs/myenvname Теперь активируем окружение # Linux source ~/venvs/myenvname/bin/activate # Windows %userprofile%\venvs\myenvname\Scripts\activate.bat Можно ставить любые библиотеки и запускать приложение. Это стандартный метод работы с любым проектом. Если еще не используете его, то пора начинать. Даже при наличии root доступа! 🔸 Бывает, что нет возможности запустить приложение из своего виртуального окружения. Например, его запускает какой-то сервис от вашего юзера и вставить активацию окружения вы не можете. В этом случае можно установить библиотеки для Python не глобально в систему, а только для юзера. Выполните этот код в консоли: python3 -m site Вы получите что-то такое: sys.path = [ '/home/user', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/user/.local/lib/python3.7/site-packages', ... ] USER_BASE: '/home/user/.local' USER_SITE: '/home/user/.local/lib/python3.7/site-packages' ENABLE_USER_SITE: True Нас интересует параметр USER_SITE. Это путь к пользовательским библиотекам, которые доступны по умолчанию, если они есть. Именно сюда будут устанавливаться модули если добавить флаг --user при установке чего-либо через pip pip install --user requests Для этой команды не нужны root-права. После неё можно запускать системный интерпретатор без виртуальных окружений и установленная библиотека будет доступна для текущего юзера. Параметр USER_BASE показывает корневую директорию для хранения user-библиотек. Её можно изменить с помощью переменной окружения PYTHONUSERBASE export PYTHONUSERBASE=~/pylibs python3 -m site ... USER_BASE: '/home/user/pylibs' USER_SITE: '/home/user/pylibs/lib/python3.7/site-packages' Получается некоторое подобие виртуального окружения для бедных 😁 которое можно менять через эту переменную (не делайте так!Лучше venv!) 🔸 Дописывание пути в PYTHONPATH Этот способ не входит в список "двух правильных", но тоже рабочий. Здесь придётся сделать всё несколько сложней. Сначала ставим библиотеку в любое место указывая путь установки pip3 install -t ~/mylibs modulename Библиотека установится без привязки к какому-либо интерпретатору. То есть по умолчанию не будет видна. Теперь в нужный момент добавляем этот путь в sys.path или в PYTHONPATH. Не буду советовать так делать. Единственный раз когда этот способ мне пригодился и решил поставленную задачу, это при создании общей библиотеки для кластера компьютеров. Модули лежат в сети и подгружаются для всех из одного и того же места. То есть обновлять файлы требуется только один раз а не на всех хосты отдельно. Минусы такого подхода: ▫️Нужно всем хостам пробить нужный путь в .bashrc или ещё куда-то чтобы он сетапился на старте. ▫️Чем больше хостов тем больше нагрузка на сеть. Иногда такой способ не подходит именно по этой причине. Тогда Ansible вам в помощь. ▫️Не очень подходит если хосты с разными операционками. Некоторые библиотеки различаются для Linux и Windows (там, где есть бинарники) и приходится мудрить более сложные схемы. #tricks#basic

Резултати

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

Пребарај: #prompt

当前筛选 #prompt清除筛选
Djemilov aidesigner — Ai Dizayn blog

@djemilovdesigner · Post #3538 · 07.04.2026 г., 17:00

{ "objective": "Create a split architectural visualization where the top is a detailed dark-themed blueprint and the bottom is a photorealistic house that matches the blueprint EXACTLY", "aspect_ratio": "3:4", "composition": { "layout": "vertical split", "top_section": "blueprint", "bottom_section": "realistic render", "alignment": "perfect structural correspondence between both sections" }, "top_section": { "type": "architectural blueprint", "style": "dark luxury blueprint (similar to reference image 2)", "visual_style": { "background": "deep navy / charcoal blue", "lines": "thin glowing beige/gold lines", "walls": "slightly extruded 3D effect", "labels": "clean modern sans-serif", "lighting": "soft ambient glow" }, "content": { "rooms": [ "3 bedrooms (left, right, bottom-right)", "central living room", "kitchen + dining (top center)", "2 bathrooms", "garage (left side connected)", "front porch", "backyard pool with deck" ], "details": [ "furniture outlines (beds, sofa, dining table)", "door swings and openings", "window placements", "circulation paths", "exact proportions and spacing" ] } }, "bottom_section": { "type": "photorealistic house render", "constraint": "MUST MATCH THE BLUEPRINT EXACTLY — no added, removed, or shifted rooms", "architecture": { "style": "modern single-story house", "roof": "flat layered roof", "materials": [ "smooth concrete walls", "wood panel accents", "large glass windows" ] }, "layout_mapping_rules": [ "garage must be on the left side exactly as blueprint", "main entrance aligned with living room", "pool positioned in backyard matching blueprint dimensions", "window placements correspond to each room location", "bedroom volumes visible externally in correct positions" ], "environment": { "setting": "suburban neighborhood", "elements": [ "green lawn", "minimal landscaping", "clean driveway leading to garage", "pool deck matching blueprint footprint" ] }, "lighting": { "time": "golden hour", "style": "soft natural light with realistic shadows" }, "camera": { "angle": "slightly elevated front perspective", "lens": "35mm architectural view" } }, "consistency_rules": [ "room positions must be identical between blueprint and render", "no extra structures added in render", "all doors and windows must align logically", "pool size and placement must match exactly", "garage placement must match blueprint" ], "style": { "top": "architectural visualization (dark premium)", "bottom": "photorealistic modern house", "overall": "clean, high-end architectural presentation" }, "negative_constraints": [ "no mismatch between blueprint and render", "no extra rooms", "no fantasy elements", "no unrealistic proportions", "no cluttered environment" ] } @djemilovdesigner#prompt

Hashtags

Djemilov aidesigner — Ai Dizayn blog

@djemilovdesigner · Post #3524 · 03.04.2026 г., 16:01

A high-resolution advertising photograph of a realistic, miniature product in the attached image, held delicately between a person's thumb and index finger: clean and white background, studio lighting, soft shadows. The hand is well-groomed, with a natural skin tone, and positioned to highlight the product’s shape and details. The product appears extremely small but hyper-detailed and brand-accurate, centered in the frame with a shallow depth of field. Emulates luxury product photography and minimalist commercial style @djemilovdesigner#prompt

Hashtags

Djemilov aidesigner — Ai Dizayn blog

@djemilovdesigner · Post #3395 · 31.01.2026 г., 05:34

Using the attached reference image, create a professional industrial design illustration sheet for packaging design of [YOUR PRODUCT NAME]. Feature a centered hero 3D render of the packaging with realistic materials, premium surface finishes, soft studio lighting, and commercial-grade realism. Surround the hero render with technical orthographic views: front view, side view, top view, bottom view, angled perspective, and flat layout (die-cut view). Include structural construction sketches, internal framework lines, fold lines, seam details, and dimension arrows labeled in millimeters. Add handwritten-style annotations indicating materials and finishes such as matte coating, glossy print, plastic, paperboard, glass, or composite materials. Show color swatches, realistic product illustrations, and subtle contact shadows to enhance depth and realism. Background should resemble a clean sketchbook or design notebook page, combining photorealistic 3D rendering with pencil sketch overlays. Modern industrial design aesthetic, ultra-detailed, balanced layout, professional presentation, portfolio-ready packaging design sheet. High clarity, sharp focus, realistic textures, accurate proportions, soft ambient shadows, neutral lighting. @djemilovdesigner#prompt

Hashtags

Djemilov aidesigner — Ai Dizayn blog

@djemilovdesigner · Post #3393 · 30.01.2026 г., 05:51

AN ULTRA-HYPERREALISTIC SURREAL PRODUCT PORTRAIT OF A “NAD+ 1000MG” SUPPLEMENT BOX PRESSED TIGHTLY INSIDE A GREEN FOAM SUPERMARKET TRAY, SEALED UNDER GLOSSY TRANSPARENT PLASTIC WRAP LIKE PACKAGED MEAT. THE RECTANGULAR BOX WITH A CLEAN WHITE SURFACE AND ORANGE TYPOGRAPHY IS AGGRESSIVELY COMPRESSED BY THE PLASTIC, CAUSING VISIBLE TENSION, SLIGHT DEFORMATION, AND PRESSURE MARKS ALONG THE EDGES AND CORNERS. THE PLASTIC WRAP CREATES STRONG SPECULAR HIGHLIGHTS, MICRO-WRINKLES, SHARP REFLECTIONS, AND REALISTIC LIGHT DISTORTION ACROSS THE “NAD+ 1000MG” TEXT AND GRAPHIC WAVE DESIGN. THE TYPOGRAPHY REMAINS CLEARLY LEGIBLE BUT SUBTLY BENT AND STRETCHED, ENHANCING THE DISTURBING STORE-BOUGHT ILLUSION. SUBTLE PAPER TEXTURE, MICRO SCRATCHES, PRINT GRAIN, AND MATTE-TO-GLOSS CONTRAST ARE VISIBLE AT A MACRO LEVEL. A YELLOW PRICE LABEL STICKER IS ATTACHED TO THE CORNER OF THE TRAY, COMPLETING THE SUPERMARKET AESTHETIC. HARSH STUDIO LIGHTING WITH STRONG DIRECTIONAL HIGHLIGHTS EMPHASIZES PLASTIC SHINE, PACKAGING COMPRESSION, AND MATERIAL REALISM. DARK BACKGROUND, EXTREMELY SATURATED YET REALISTIC COLOR GRADING, MACRO-LEVEL SHARPNESS, ULTRA-HIGH RESOLUTION, HYPERREAL PRODUCT FASHION-ART PHOTOGRAPHY, SURREAL, UNSETTLING, VISUAL METAPHOR OF MODERN CONSUMPTION AND PRESSURE. @djemilovdesigner#prompt

Hashtags

Djemilov aidesigner — Ai Dizayn blog

@djemilovdesigner · Post #3372 · 17.01.2026 г., 17:07

An extremely unremarkable iPhone photo of [SOURCE SUBJECT / SCENE], shot in a neglected, abandoned environment. A harsh, narrow beam of light from a handheld flashlight, coming from one side, partially illuminates the scene, creating aggressive overexposure where the light hits and deep shadows elsewhere. The environment feels trashed, dusty, and untouched for years. Surfaces are covered in thick cobwebs, dirt, and grime. Objects appear old, worn, and forgotten. The image is low-quality and imperfect: visible digital grain, slight motion blur, uneven focus, washed-out highlights, crushed blacks, and poor dynamic range. Lighting is uncontrolled and amateur. Composition feels accidental, like a quick snapshot rather than a composed photo. Overall aesthetic is mediocre, raw, and documentary-like, resembling found footage or a forgotten phone gallery image. Shot on an old iPhone camera, no cinematic polish, no stylization, no beauty lighting. Absolutely no timestamps, no date overlays, no text, no UI elements. @djemilovdesigner#prompt

Hashtags

Behzod Otajonov visual artist

@behzod_otajonov · Post #1550 · 18.10.2024 г., 04:02

Onlayn darsimizda kecha qilib ko'rgan ishimiz. 1-rasmni o'quvchim generatsiya qilgan. 2-3-rasmlarda unga o'zgartirishlar kiritib tayyor mahsulotni generatsiyaga moslashtirdik. Atrofidagi olmalar sifati ham yaxshilandi. #prompt Luxury product photography, tall red metallic bottle wrapped with dark wooden vine branch, fresh red apples and green leaves surrounding the bottle, modern cityscape and green mountains in background, dramatic lighting, hyper-realistic render, premium advertising style, high-end product placement, shallow depth of field, glossy red finish, fresh apple tree elements, professional commercial photography

Hashtags

GPTunneL

@gptunnel · Post #490 · 20.10.2025 г., 11:00

🦇Попробуй себя в роли Дракулы Осень — время, когда хочется чего-то необычного. Добавьте немного мистики в ленту — превратите обычное фото в кинематографичный образ графа Дракулы. 💡Рекомендации: 😀Выбирайте фото, где чётко видно лицо, без резких теней и фильтров, в высоком качестве. Загрузите снимок, вставьте промпт: Using the provided portrait image, create a premium vampire character transformation in Higgsfield style. Place the character in a modern penthouse apartment setting with city lights, dramatic shadows, and an atmospheric contemporary environment. Selfie shot on Sony Alpha a7 IV, Higgsfield photorealistic style, close-up portrait, dutch angle low angle shot with vampire looking directly into camera and intense piercing gaze. Keep the transformed vampire as the sharp central focus with pale skin, sharp fangs, glowing red eyes, detailed eyes with catch light reflections, slicked back dark hair, while EXACTLY preserving the original hairstyle, facial bone structure, nose shape, eye shape, lip contour, and ALL distinctive facial features. PERFECTLY maintain the original clothing style, headwear, glasses, and accessories from the photo, transforming them into elegant modern vampire aesthetic - adapting colors to darker tones, adding luxurious textures, gothic details, and contemporary vampire elements while keeping the original garment structure and design. Vampire's pale hand with long fingers and nails in natural pose holding candle in candlestick - hand naturally positioned to grip the candlestick properly, not constrained by original photo pose. Optionally, add cinematic color grading and deep atmospheric shadows as dramatic accents. 🔗 Для генерации – Seedream 4. Для оживления фотографии воспользуйтесь инструментом. Скоро Хэллоуин 🎃 вдохновляйтесь и экспериментируйте с GPTunneL #prompt@gptunnel

Hashtags

123•••10•••20•••2526
ПретходнаСтраница 1 од 26Следна