create account

CLOSED: 125 STEEM Developer Bounty Inside [Python] by felixxx

View this thread on: hive.blogpeakd.comecency.com
· @felixxx · (edited)
$59.68
CLOSED: 125 STEEM Developer Bounty Inside [Python]
## NOTE: THIS BOUNTY IS TAKEN SINCE BLOCK 19640323
#

The other day, I found this bot:

https://github.com/E-D-A/steem-curatebot

by @danielsaori

Yesterday, I forked the code and converted it to do @deutschbot's job:

https://github.com/fxnormaluser/steem-deutschbot

This is what it does:

```
Steem deutschbot is a fork of:

https://github.com/E-D-A/steem-curatebot

Steemit curation bot with Discord integration.

The bot will login to Discord and starts to listen to the blockchain in the background.

It holds a list of 'trusted curators' for a certain hashtag on Steem. (#deutsch)

It streams all votes of the 'trusted curators' and their vote_weight and calculates a score for each post.

If a certain threshold is reached, the bot will vote for a post and broadcast its vote to Discord.

Commands:

$blacklist STEEMUSER
$curator STEEMUSER
$set_threshold 10000 (= 100% vote_weigh)
( leave argument blank to return a list )
```
#
The script works and does that job;
It's not nice code, at all:

- it crashes unexpectedly ( **25 Steem** )
- it makes too many API calls ( @gtg will not like it ) ( **25 Steem** )
Perhaps, parsing the stream to a local db would be a solution ...
- ... the db system is awful ( **25 Steem** )
- I have to initialize the ```Steem()``` Object at different points in the code for it to work and I don't exactly understand why.  ( **25 Steem** )
- Optional: 
I have to use ```set_shared_steemd_instance``` to manually override which nodes Steem-Python connects to. 
This would need to be fixed in the official repository. ( **25 Steem** )

If you can fix or upgrade my code, feel free to do so.
#### If you can fix one or more of the issues mentioned above, I will reward you in Steem;
##
## 125 Steem in total*
##
### This bounty ends, when the payout-period of this post ends.
##
- Make a pull request on [github](https://github.com/fxnormaluser/steem-deutschbot)
- Comment and link your PR under this post

Of course, **your code has to work**.

In case of multiple entries, I will try to pick the smartest solution.
However, if your solution works, you will *probably* win a price, anyways.

It took me a whole day to come up with the new deutschbot.py.
I figured, it would take a skilled programmer another day to clean up my mess.

Therefore, I hope 75 - 125 STEEM is enough.

___
## *Disclaimer:
##
_I will simultaneously work on the code, too.
If I find the best solution myself, I reserve the right to keep some of the bounty.
Furthermore, if no valid entries are made, I will keep the bounty for a later try._
___

Feel free to contact me here or in Discord, if you have any questions.
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 15 others
properties (23)
authorfelixxx
permlink125-steem-developer-bounty-inside-python
categorysteemdev
json_metadata{"tags":["steemdev","bounty","programming","utopianmyass","htid"],"users":["danielsaori","deutschbot","gtg"],"links":["https://github.com/E-D-A/steem-curatebot","https://github.com/fxnormaluser/steem-deutschbot"],"app":"steemit/0.1","format":"markdown"}
created2018-02-01 08:29:57
last_update2018-02-06 19:10:00
depth0
children15
last_payout2018-02-08 08:29:57
cashout_time1969-12-31 23:59:59
total_payout_value46.184 HBD
curator_payout_value13.499 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,628
author_reputation216,289,007,274,068
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,076,513
net_rshares9,614,302,795,478
author_curate_reward""
vote details (79)
@bobbyboe ·
danke schΓΆn!
properties (22)
authorbobbyboe
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180202t235127755z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-02 23:51:27
last_update2018-02-02 23:51:27
depth1
children0
last_payout2018-02-09 23:51:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation2,597,193,520,252
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,514,930
net_rshares0
@emrebeyler ·
$2.32
hi @felixxx,

The script looks like too messy to refactor. I can do a complete rewrite in 24 hours for a total 125 STEEM. What do you think about that? I am experienced w/ discord and steem api's.
πŸ‘  , , , ,
properties (23)
authoremrebeyler
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180201t083925925z
categorysteemdev
json_metadata{"tags":["steemdev"],"users":["felixxx"],"app":"steemit/0.1"}
created2018-02-01 08:39:27
last_update2018-02-01 08:39:27
depth1
children7
last_payout2018-02-08 08:39:27
cashout_time1969-12-31 23:59:59
total_payout_value1.748 HBD
curator_payout_value0.567 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length196
author_reputation448,535,049,068,622
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,078,341
net_rshares373,471,403,409
author_curate_reward""
vote details (5)
@ace108 ·
$2.09
Don't know enough Python but totally agree sometimes to clean up the mess takes a longer time than to redesign and rewrite the thing :-)
πŸ‘  
properties (23)
authorace108
permlinkre-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t091729382z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 09:17:30
last_update2018-02-01 09:17:30
depth2
children0
last_payout2018-02-08 09:17:30
cashout_time1969-12-31 23:59:59
total_payout_value1.570 HBD
curator_payout_value0.521 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length136
author_reputation1,226,064,821,432,793
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,085,443
net_rshares336,918,492,033
author_curate_reward""
vote details (1)
@felixxx ·
I agree, that it really is messy.

If you did a complete redesign, I'd like to plan ahead for some extra features.

I'll just wait for some more replies, to give others a chance - Hope that's ok.
properties (22)
authorfelixxx
permlinkre-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t084506985z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 08:45:09
last_update2018-02-01 08:45:09
depth2
children5
last_payout2018-02-08 08:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length195
author_reputation216,289,007,274,068
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,079,469
net_rshares0
@emrebeyler ·
$2.31
No problem.

I have a couple of ideas:

- Don't parse every block. Instead use get_account_history for each curator and filter only votes. Much more cleaner code and less overhead. This will remove almost half of the code. 

- Use mongodb to log already sent votes and [check](https://github.com/utopian-io/utopian.tip/blob/master/utopian_tip/utopian_tip.py#L86) from there.

- Use supervisord to restart the bot if bot goes down. Fixing the main reason is the real solution however you can always use Supervisord to auto-restart the process.

- Custom node settings are not valid on some internal classes of steem-python. There are a couple of pull requests waiting for approval about this issue but they didn't do that yet. Using get_account_history with a custom list of nodes working well though. So, this won't be a o problem.

Let me know, if you decide for a rewrite.

my Discord id: emre#9263.
πŸ‘  , ,
properties (23)
authoremrebeyler
permlinkre-felixxx-re-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t085732263z
categorysteemdev
json_metadata{"tags":["steemdev"],"links":["https://github.com/utopian-io/utopian.tip/blob/master/utopian_tip/utopian_tip.py#L86"],"app":"steemit/0.1"}
created2018-02-01 08:57:33
last_update2018-02-01 08:57:33
depth3
children4
last_payout2018-02-08 08:57:33
cashout_time1969-12-31 23:59:59
total_payout_value2.244 HBD
curator_payout_value0.070 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length901
author_reputation448,535,049,068,622
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,081,773
net_rshares373,295,077,721
author_curate_reward""
vote details (3)
@ethanthefighter ·
$0.03
Hmm This sounds a pretty interesting, but the code seems to be missing something. I'm not sure what, just a feeling.
πŸ‘  
properties (23)
authorethanthefighter
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180206t222602210z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-06 22:24:36
last_update2018-02-06 22:24:36
depth1
children0
last_payout2018-02-13 22:24:36
cashout_time1969-12-31 23:59:59
total_payout_value0.022 HBD
curator_payout_value0.003 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length116
author_reputation2,674,103,331,455
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id35,508,409
net_rshares4,544,723,220
author_curate_reward""
vote details (1)
@jakboy ·
nice
properties (22)
authorjakboy
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180202t105148398z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-02 10:51:45
last_update2018-02-02 10:51:45
depth1
children0
last_payout2018-02-09 10:51:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation45,413,276,305
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,371,052
net_rshares0
@muhammadkariman ·
a very good post
anyone who reads it will like it
I really like your posts
@muhammadkariman
properties (22)
authormuhammadkariman
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180201t175801105z
categorysteemdev
json_metadata{"tags":["steemdev"],"users":["muhammadkariman"],"app":"steemit/0.1"}
created2018-02-01 17:58:09
last_update2018-02-01 17:58:09
depth1
children0
last_payout2018-02-08 17:58:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation4,766,909,247
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,189,101
net_rshares0
@shamsa ·
Beautiful cute post so sweet
πŸ‘  
πŸ‘Ž  
properties (23)
authorshamsa
permlinkre-felixxx-201821t133511778z
categorysteemdev
json_metadata{"tags":["steemdev","bounty","programming","utopianmyass","htid"],"app":"esteem/1.5.0","format":"markdown+html","community":"esteem"}
created2018-02-01 08:35:15
last_update2018-02-01 08:35:15
depth1
children0
last_payout2018-02-08 08:35:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation415,671,106,747
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,077,542
net_rshares-352,814,582,318
author_curate_reward""
vote details (2)
@stekz42 ·
Cant help but like this idea! :) go for it !
properties (22)
authorstekz42
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180201t103136807z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 10:31:36
last_update2018-02-01 10:31:36
depth1
children0
last_payout2018-02-08 10:31:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation88,531,253,469
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,099,411
net_rshares0
@yogaunimal ·
you are one of those people who are always grateful and patient. you deserve success in all areas.
properties (22)
authoryogaunimal
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180203t042035490z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-03 04:20:42
last_update2018-02-03 04:20:42
depth1
children0
last_payout2018-02-10 04:20:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length98
author_reputation532,190,094,714
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,555,231
net_rshares0