[GIVEAWAY RESULTS] Announcing the lucky winners of the Bitshares shirt raffle!

in #bitshares7 years ago (edited)

To all of the entrants of the raffle one week ago- thank you for your entry! It's now time to announce the winners.

Congratulations to @mrehqe on winning the Polo and @robertdurst10 on winning the T-shirt!!! Please send me a message with your shipping details on steemit.chat or telegram, I'm robrigo in those chats as well.

Here's the proof:

bitshares-raffle.gif

I used the following code snippet below to pick winners at random from the comment replies. Feel free to adapt it for your own contests!

import re
import random

from steem import Steem

polo_regexp = re.compile(r'polo', flags=re.IGNORECASE)
tshirt_regexp = re.compile(r'tshirt|t\-shirt|shirt',flags=re.IGNORECASE)

BLACKLIST = ['matt-a']

s = Steem()

raffle_replies = s.get_content_replies('robrigo', 'giveaway-bitshares-polo-and-t-shirt-up-for-grabs-to-celebrate-smashing-bugs')

random.shuffle(raffle_replies)

entrants = {
    'polo': [],
    'tshirt': []
}

for reply in raffle_replies:
    if (reply['author'] in BLACKLIST 
    or reply['author'] in entrants['polo'] 
    or reply['author'] in entrants['tshirt']):
        continue
    elif polo_regexp.search(reply['body']):
        entrants['polo'].append(reply['author'])
    elif tshirt_regexp.search(reply['body']):
        entrants['tshirt'].append(reply['author'])

print("""
    Congratulations %s! You win the polo.
    Congratulations %s! You win the tshirt.
""" % (random.choice(entrants['polo']), random.choice(entrants['tshirt'])))
Sort:  

WOW, SO EXCITED!!!! Going to a couple Hackathons in two weeks, including the Silicon Valley Fintech Week Hackathon. Most definitely going to wear this shirt and spread the DPOS love! Thanks @robrigo for the putting on the raffle and @matt-a for the shoutout! Just sent you a message on steemit.chat @robrigo and resteemed this post. Cheers and Steem on!

Sounds like it's going to a good home. :)

Congrats to the winners ! Hope to see more giveaways like this :)

missed the raffle, next time mayhaps. thanks for doing all you do for Steemit yo! and thats cool of you for even posting the video of the raffle happening. Congrats winners

Great post!

@robrigo,
That would be a great work! Next time I will participate and will try to win!
And I could see the source code. Is this C or C++?

After all, I would like to Congratz all the winners!

Cheers~

Hi, glad you liked it! This is Python code. :)

@robrigo,
I don't have experience with Python! I did C and C++ long time ago! Thanks for sharing!

Thanks for sharing. Good post

@fahrullah

Very good your post, I hope you visit mine and you like it

Congratulations guys! Wear them with pride! :d

Well done, wish more in future.

Coin Marketplace

STEEM 0.31
TRX 0.12
JST 0.034
BTC 64418.55
ETH 3157.64
USDT 1.00
SBD 4.06