debug's files (Prompt Library)
1.38K subscribers
642 photos
33 files
8 links
Это Prompt Library: всё для копирования и файлов.

Каталог материалов из @debugblog
Download Telegram
onlineshop.py
7.5 KB
👩‍💻 Простейший онлайн магазин на #Python
Не использует никакие API
Please open Telegram to view this post
VIEW IN TELEGRAM
viselitsya.py
5.2 KB
Игра Виселица на #Python 👩‍💻
Please open Telegram to view this post
VIEW IN TELEGRAM
pingpong.py
3.2 KB
👩‍💻 Пинг-понг на двоих 😁
на #Python
Please open Telegram to view this post
VIEW IN TELEGRAM
tommy.py
6.1 KB
👩‍💻 Генератор цитаток из фильма Комната на #Python
Please open Telegram to view this post
VIEW IN TELEGRAM
browser.py
1.6 KB
Браузер на языке #Python
tamagoshi.py
3 KB
Тамагочи на языке #Python
Решаем задачу:

У вас бесконечный запас воды и два ведра — на 5 литров и 3 литра. Вопрос: Как вы отмерите 4 литра?


Как-то так:

from collections import deque
import math

def solve_water_jug(a_cap, b_cap, target):
# Проверка разрешимости
if target > max(a_cap, b_cap):
return "Невозможно: цель больше любого ведра"
if target % math.gcd(a_cap, b_cap) != 0:
return "Невозможно: НОД не делит целевой объём"

# BFS очередь: (состояние, путь)
queue = deque([((0, 0), [(0, 0)])])
visited = set()
visited.add((0, 0))

while queue:
(a, b), path = queue.popleft()

# Проверка цели
if a == target or b == target:
return path

next_states = []

# 1. Заполнить A
next_states.append((a_cap, b))
# 2. Заполнить B
next_states.append((a, b_cap))
# 3. Опустошить A
next_states.append((0, b))
# 4. Опустошить B
next_states.append((a, 0))
# 5. Перелить из A в B
pour = min(a, b_cap - b)
next_states.append((a - pour, b + pour))
# 6. Перелить из B в A
pour = min(b, a_cap - a)
next_states.append((a + pour, b - pour))

for state in next_states:
if state not in visited:
visited.add(state)
queue.append((state, path + [state]))

return "Решение не найдено"

# Пример: классическая задача — получить 4 литра из 5 и 3
solution = solve_water_jug(5, 3, 4)
for step in solution:
print(step)


#Python
#photoprompt

copy then👇🏻

A side-profile portrait framed from the chest up, captured against a dark, minimal background with a focused beam of cool light illuminating the subject. The lighting is low-key and directional, coming from the upper rear right at a cool temperature (~5000K), creating a striking rim light along the face, headphones, and jacket edges while leaving the rest of the composition in deep shadow. The background transitions smoothly from near-black to soft gray tones (approx. HEX #0A0E12 to #1E2227), with a faint diagonal light streak adding depth and atmosphere. The subject wears a dark, matte-textured jacket with subtle highlights emphasizing its structure, and large over-ear headphones in metallic or matte silver tones with faint reflections on their surface. The pose is neutral and composed, with the face slightly tilted forward, conveying focus and introspection. Use a simulated 85mm lens at f/2.0 for shallow depth of field and precise subject isolation, capturing clean textures and controlled light falloff. The overall aesthetic is cinematic and modern, combining minimalist composition with moody, high-contrast lighting for a sleek, futuristic editorial tone. Editorial, modern, high-detail, cinematic composition, ultra-realistic textures, professional fashion photography style.
🔥21
#photoprompt

copy then👇🏻

Create a bold, stylized half-length portrait of the person from the input photo, captured from a low-angle upward-facing perspective, with the head tilted back slightly and the face illuminated from below. The subject wears a high-neck garment (e.g., ribbed turtleneck) and large, glossy sunglasses that reflect stylized neon light. The lighting is highly directional and graphic: use deep blue ambient fill with hard hot pink key lighting that casts sharp, unnatural gradients across the face, sunglasses, and clothing, creating a posterized or vector-like glow. The background is a pure, uninterrupted black (#000000), with no visual distractions — enhancing the isolation and intensity of the subject. Simulate a telephoto lens (85–135mm) at f/2.0 for high subject clarity with natural compression. Reflections on the glasses should dominate the upper part of the image, possibly with abstract neon shapes or color blocks. The skin texture is softly stylized or semi-synthetic, and shadows fall off steeply. The final aesthetic is cyber-noir, editorial, posterized, and ultra-minimalist, evoking digital anonymity, power, and cool detachment.
🔥21
#photoprompt

copy then👇🏻

A mid-shot portrait framed from the chest up, featuring a minimalist, high-contrast lighting setup that creates a striking dual-tone color effect. The composition centers the subject against a completely dark background (approx. HEX #06060A), enhancing isolation and mood. The lighting is strongly directional — a deep red key light (~2200K) from the right and a cool cyan-blue fill (~6000K) from the left — producing a dramatic chromatic split across the face and neck. The color palette is dominated by rich reds, deep shadows, and cool blue highlights, creating a cinematic balance between warmth and coldness. The subject’s clothing is simple and matte, typically a dark shirt that absorbs light and keeps focus on facial contours. The expression is calm, introspective, and slightly detached, enhancing the atmospheric intensity. Use a simulated 85mm lens at f/1.8 for shallow depth of field, ensuring sharp focus on facial features while allowing smooth gradient falloff into the shadows. The overall aesthetic is moody, modern, and futuristic — blending fashion minimalism with cyber-noir lighting. Editorial, modern, high-detail, cinematic composition, ultra-realistic textures, professional fashion photography style.
1🔥1
#photoprompt

copy then👇🏻

A close-up portrait framed from the chest up, set in an urban night environment illuminated by bold neon lighting. The subject stands slightly turned to the side with a composed, confident expression, wearing reflective sunglasses that capture the surrounding neon signs. The lighting is dual-toned and cinematic — a deep red key light (~2500K) from one side and a contrasting cyan-blue fill (~5500K) from the opposite, creating sculptural definition and a cyberpunk-inspired chromatic contrast across the face and clothing. The background features softly blurred neon panels and bokeh lights in red and blue hues (approx. HEX #E6003A to #009FE3), providing depth and atmosphere. The outfit consists of a dark, matte or leather-textured jacket with structured folds that catch subtle reflections from the colored lights, emphasizing texture and contour. The overall palette is moody and saturated, blending urban futurism with editorial polish. Use a simulated 85mm lens at f/1.8 for shallow depth of field and cinematic subject isolation, ensuring high clarity on the illuminated edges while maintaining soft background diffusion. The mood is sleek, mysterious, and modern — merging high-fashion edge with cyber-noir lighting. Editorial, modern, high-detail, cinematic composition, ultra-realistic textures, professional fashion photography style.
1👍1🔥1
#photoprompt

copy then👇🏻

Generate a cinematic, editorial-style half-length portrait of the person from the input photo, captured in a centered front-facing or slightly off-center pose, with a neutral or confident expression. The subject wears a dark, matte hoodie or streetwear garment, rendered with soft folds and light-absorbing texture. Over-ear headphones should be present, adding a modern audio-tech aesthetic. The background features a bold circular orange-red sun-like graphic (approx. #FF3D00 → #D12F1F), with horizontal or radial light patterns or stylized retro-futuristic stripes, set against a pure black backdrop (#000000). The lighting setup includes strong, low-key rim light in warm orange tones from behind, subtly separating the silhouette from the dark background, and a soft, cool fill light (e.g. desaturated violet or teal) from camera-front for facial definition. Simulate a portrait lens at 85mm or 105mm with f/2.8, producing shallow depth of field, sharp focus on the face and foreground elements, and soft separation from the graphic circle. Avoid environmental clutter or props. The final aesthetic is graphic, moody, and modern, blending retro synthwave-inspired design language with contemporary fashion-tech visuals. Emphasis on bold contrast, circular framing, and minimalist composition.
1
#photoprompt

copy then👇🏻

Generate a stylized, semi-cartoon 3D character portrait of the person from the input photo, rendered in smooth plastic-like material with soft surface gradients and rounded geometry. The subject is seated directly behind an open laptop, visible from mid-torso upward, with the screen casting a cold white glow upward onto the face and hoodie. The subject wears casual techwear (e.g. hoodie and glasses), with oversized round or square glasses that reflect floating UI elements (calendar, date, icons), visible across the lenses. The character's facial expression should be focused, immersed, or slightly intense, eyes locked on the screen or barely visible through stylized reflections. The lighting is dramatic and minimal: primary cool screen-light glow from below and accent purple or blue rim light on hoodie edges. The background is a deep matte black or desaturated navy (approx. #0B0E14 → #1A1C24), enhancing subject contrast and isolating the digital environment. Add subtle light bloom and specular highlights on the face, hands, and glasses. The laptop shell may contain stylized digital stickers or branding icons for realism and personality. Simulate a medium telephoto camera angle (around 50mm) with medium depth of field, keeping the entire upper body and screen crisp. The final aesthetic is dark-mode digital, creator-core, and editorially stylized, evoking creative focus, coding energy, and Gen Z tech identity.
#photoprompt

copy then👇🏻

Create a hyperrealistic, cinematic close-up portrait of the person from the input photo, focusing on the left side of the face in an intense, tightly cropped composition (showing ear to lips). The subject wears round tinted sunglasses and is styled with visible facial stubble and textured skin detail, evoking a rugged, noir-inspired look. Clothing should include a high-collared dark coat or jacket, with sharp folds and shadowed volume. The lighting setup is moody and graphic — a hard red directional key light from camera-right casts rich, saturated shadows across the subject’s skin, while the left side is immersed in subtle grayscale low-key lighting, producing metallic texturing and dimensional grit. The background is a bold solid crimson red (#B61218 → #E21B1B) with a slightly distressed, grainy or grunge overlay. Apply cinematic contrast with sharp detail in skin pores, hair, and lenses, while preserving deep shadows and a stylized color bleed effect. Use a simulated full-frame 135mm lens at f/3.2 for compressed, intimate depth, with zero depth blur — everything must feel sharp, heavy, and deliberate. The final aesthetic is dark, editorial, and poster-grade, combining Nolan-style realism, MCU noir palette, and graphic novel tension, ideal for heroic, anti-heroic, or vigilante character stylizations.