filmov
tv
Pick 1 of 2 Items Randomly with a Weighted Percent in Python and Ruby
Показать описание
With a 1 line function you can randomly pick item A X% time and item B Y% time.
Hit the subscribe button to receive more videos like this!
REFERENCE LINKS
---------------------------------------------------
COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.
THE TOOLS I USE / GEAR
---------------------------------------------------
FOLLOW ME ELSEWHERE
---------------------------------------------------
TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:38 -- Starting off with an evenly split sample without weights
1:52 -- Going over weighted sampling, starting off with the "why"
4:16 -- Breaking down the problem using dice rolls as a comparison
6:01 -- Running the Ruby code to pick a weighted sample
6:32 -- Going back to how our weighted_sample function works
8:31 -- Doing the same thing in Python
9:38 -- Python has an alternative built-in option with the choices function
11:44 -- With Python, which solution should you use?
Hit the subscribe button to receive more videos like this!
REFERENCE LINKS
---------------------------------------------------
COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.
THE TOOLS I USE / GEAR
---------------------------------------------------
FOLLOW ME ELSEWHERE
---------------------------------------------------
TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:38 -- Starting off with an evenly split sample without weights
1:52 -- Going over weighted sampling, starting off with the "why"
4:16 -- Breaking down the problem using dice rolls as a comparison
6:01 -- Running the Ruby code to pick a weighted sample
6:32 -- Going back to how our weighted_sample function works
8:31 -- Doing the same thing in Python
9:38 -- Python has an alternative built-in option with the choices function
11:44 -- With Python, which solution should you use?
Pick 1 of 2 Items Randomly with a Weighted Percent in Python and Ruby
What would you choose item 1 or 2. #rather #choose #tranding #shorts #viral
Choose the Right Items to help Sadness escape | Inside Out 2
1 2 3 Choose your items look 🔥 Avatar World and Toca Boca ❤️💙
What will you choose item 1 or item 2. #tranding #funny #choose #trend #quiz #trivia #red #blue
What would you choose item 1 or item 2. #viral #choose#rather#tranding#trend#trending#whatyourather
What you will choose Item 1 or Item 2. #viralshorts #choose #tranding #funny #chose #trend #quiz
WALGREENS RUN CURBSIDE DEALS (1/19 - 1/25) | ***Paper Products for 60¢ 😱
Retro Items Pick My Team
1 2 3 Choose Your Items 🎁 Avatar World and Toca Boca 💙❤️
PICK ONE ANIME ITEM AND THE REST GOTTA GO 👀 #naruto #onepiece #jujutsukaisen #hxh #demonslayer #kny...
1 2 3 Choose Your Items 🎁❤️ Avatar World and Toca Boca 😍💙
Pick One Kick One - SCHOOL Items Edition 📝🖋️🏫
BUY 2, GET 1 FREE on select items💚Don’t miss out on the perfect opportunity to snag those items
Your at a sleepover pick your items pt.1#skincare #preppyyyy
1 2 3 Choose Your Items 🔥 Avatar World and Toca Boca ❤️💙
What will you choose item 1 or 2 #trend #chose #quiz #choose #funny #tranding #red #blue #trand
If I Could Only Pick 6 SURVIVAL Items #survival #bushcraft #camping
1 2 3 Choose your look Waterpark Items 🔥Avatar World
1 2 3 Choose Your Items 😍 Avatar World and Toca Boca ❤️💙
What will you choose item 1 or 2? #tranding #chose #quiz #trend #choose #funny #riddles #chooseone
#POV you need to choose between 2 items. #cny2023
Chicken NUGGET Policeman Choose The Right Item To Help Max Who Has A Hurt Leg 👍️
PUBG Continental Series 1 - Pick’em Challenge Items | PUBG
Комментарии