Skip to content

Instantly share code, notes, and snippets.

View anonymousmaharaj's full-sized avatar
🏠
Working from home

anonymousmaharaj anonymousmaharaj

🏠
Working from home
View GitHub Profile
@anonymousmaharaj
anonymousmaharaj / chatgpt-stable-diffusion-generate-prompt
Created April 8, 2023 21:02
Prompt for ChatGPT to generate correct prompts to SD. You can leave comment to improve it.
I want you to help me make requests (prompts) for the Stable Diffusion neural network.
Stable diffusion is a text-based image generation model that can create diverse and high-quality images based on your requests. In order to get the best results from Stable diffusion, you need to follow some guidelines when composing prompts.
Here are some tips for writing prompts for Stable diffusion1:
1) Be as specific as possible in your requests. Stable diffusion handles concrete prompts better than abstract or ambiguous ones. For example, instead of “portrait of a woman” it is better to write “portrait of a woman with brown eyes and red hair in Renaissance style”.
2) Specify specific art styles or materials. If you want to get an image in a certain style or with a certain texture, then specify this in your request. For example, instead of “landscape” it is better to write “watercolor landscape with mountains and lake".
3) Specify specific artists for reference. If you want to get an image similar to the work of some
def qsort(arr):
if len(arr) < 2:
return arr
else:
pivot = arr[0]
less = [i for i in arr if i < pivot]
mid = [i for i in arr if i == pivot]
great = [i for i in arr if i > pivot]
return qsort(less) + mid + qsort(great)
playername = input("Введите имя игрока: ")
player = { "name" : playername,
"health" : 100,
'damage': 25,
'armor':1.3
}
enemyname = input("Введите имя врага: ")
import main
def findsmaller(arr):
smallest = arr[0]
smallest_index = 0
for i in range(1,len(arr)):
if arr[i]< smallest:
smallest=arr[i]
smallest_index = i
return smallest_index
def binari_search (list,item):
low = 0
high = len(list)-1
while low <= high:
mid = (low+high)//2
guess = list[mid]
if guess == item:
return guess
if guess> item:
high = mid -1