Python Random Choice Tutorial | How to Create NFT Rarity in Python with Random Choice

preview_player
Показать описание
In this Python random choice tutorial, we'll look at how to implement random choice in an NFT project to generate dynamic attributes according to pre-defined weights.

In the world of NFTs, mixing images together from an asset library is a handy trick.

In this quick video, we'll use the Python Random library to generate images like we did in the previous video, but with random features according to weights (rarity)

This is step 2 in our generative NFT project.

Helpful Links:
Рекомендации по теме
Комментарии
Автор

Hey thanks for the awesome tutorial, just finished adding rarity and weights to my Blend_My_NFTs repo and it works perfectly!

TorrinLeonard
Автор

how do we do it without duplicates? I'm trying to make one which makes all the possible outcomes but no duplicates so I'm not sure how to do it

arshamshirkouhi
Автор

Great tutorial! But I'm having a error :( "ValueError: images do not match" do u know how I solve this?

SeekVeracity
Автор

Great tutorial thank you! @Techmaker Studio is there a way to output the layered files as PSD / TIF or another file format that keeps the layers intact? I need to do some manual adjustments to the layers in the output files and that doesn't seem possible with a PNG...

Endermite-xpst
Автор

Say you generate a list every possible combination of your NFT, is there a way to create a list of NFTs from that everything list, but in a way that weights attributes of the NFT? So the final list represents the weights you assigned to the attributes?

TorrinLeonard
Автор

I got this weird error with my code, any ideas?

raise ValueError('The number of weights does not match the population')
ValueError: The number of weights does not match the population

tysonlmao
Автор

Hello. I am minting my collection of 5555 nfts on opensea using python bot. The only problem I am facing is each time it mints an nft, it asks me to solve the recaptcha which is painstaking for 5555 nfts.

Does anyone have any answer for this issue?

tamjeed
Автор

Frogs Here, Frogs There... Frogs Everywhere! 🤣

sbeelectrichvac
Автор

Same question as Endermite. Can you output layered files? Thanks 🙏

zacks
Автор

intermediate =Image.alpha_composite(img1, img2)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/Image.py", line 3168, in alpha_composite
return im1._new(core.alpha_composite(im1.im, im2.im))
ValueError: image has wrong mode

morriskawel