Comedyopenmic Round 37 - What Idi has been doing

Wow Idi, you never post anymore
Said no one ever...

So welcome to my COM entry for now.

But still whether you've noticed or not, I haven't been posting because I've been busy on some stuff. I used to post things

I used to make nice posts, like this one only you know no one cared, Or rather I may not have cared about those caring who are wonderful people I might add

Here's something else I used to post and it was fun. I will won day return and actually post. until then, so you know what I'm doing, I'm working on stuff for comedyopenmic.

One thing I made was the scripts for account creation and we've already on boarded new people that steem wasn't quick enough to help. who may have otherwise left.

So this here bit of code, that I now give out freely to those that would otherwise steal it, will keep 5 accounts claimed and available to be created on a whim.

from beem.steem import Steem
from beem.nodelist import NodeList
from beem.account import Account
from beem.rc import RC

import sys
import os

DIR_PATH = os.path.dirname(os.path.realpath(__file__))
sys.path.append(f"{DIR_PATH}/../keys")

from COMkeys import Active_Key as active_key

accountname = 'comedyopenmic'
Min_RC_lim = 90 # Don't create an account if RC is below this
Pending_Limit = 5 # Maximum number of pending accounts to keep banked.

nodes = NodeList()
nodes.update_nodes()
s = Steem(nodes = nodes.get_nodes(), keys = [active_key])

acc = Account(accountname, steem_instance=s)
rc = RC(steem_instance=s)
current_costs = s.get_rc_cost(rc.get_resource_count(tx_size=250, new_account_op_count=1))

RC_deets = acc.get_rc_manabar()
current_pct = RC_deets['current_pct']
current_mana = RC_deets['current_mana']
pending_claimed_accounts = acc["pending_claimed_accounts"]


if ((current_mana > current_costs) ):
    if ((current_pct > Min_RC_lim)):
        if pending_claimed_accounts < Pending_Limit:
            s.claim_account(accountname, fee='0 STEEM')

As you can see it's very simple. and luckily by using beem it keeps it very stable (I kinda have a thing for the holgmeister though I suspect it's not mutual... In my defence how was I supposed to know he doesn't appreciate a good dick pic, his brother in law didn't mind me taking the pic.

Anyway but I digress

So that little snippet of code I run every 8 hours. I worked out with the comedyopenmic account at approximately 45,000SP we're able to create about 3 accounts every 24 hours sustainable. So that just keep running and ensures we've always got accounts to use when someone asks for an account for a friend. or for fun.

To create the account, I manually run the below code to create the code.

from beem.steem import Steem
from beem.nodelist import NodeList

import sys
import os


DIR_PATH = os.path.dirname(os.path.realpath(__file__))
sys.path.append(f"{DIR_PATH}/../keys")

from COMkeys import Active_Key as active_key

accountname = 'comedyopenmic'

nodes = NodeList()
nodes.update_nodes()
s = Steem(nodes = nodes.get_nodes(), keys = [posting_key, active_key])

account_name = "New_Account_Name"

new_key = "New_Account_Password"

s.create_claimed_account(account_name,  creator=accountname, password=new_key)

And that's it. It's really simple and easy. and anyone with more than about 3k SP will be able to do it. The amount changes constantly.

BTW, if you haven't seen already go read The holgmeister's post about rewarding. Then go upvote my old posts because they're awesome.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center