I hereby claim:
- I am emre on github.
- I am emrebeyler (https://keybase.io/emrebeyler) on keybase.
- I have a public key ASCTYcWUVTTA50dn1Uzn-PZKVd2F0PBXfMLxng0BoTdj2Qo
To claim this, I am signing this object:
| import openai | |
| from threading import Thread | |
| import time | |
| def work_with_openai(tid): | |
| key = f"key_{tid}" | |
| openai.api_key = key | |
| print(f"Thread {tid} set api key as {key}") |
| log-appender = {"appender":"stderr","stream":"std_error"} {"appender":"p2p","file":"logs/p2p/p2p.log"} | |
| log-logger = {"name":"default","level":"info","appender":"stderr"} {"name":"p2p","level":"warn","appender":"p2p"} | |
| backtrace = yes | |
| plugin = webserver p2p json_rpc witness account_by_key reputation market_history | |
| plugin = database_api account_by_key_api network_broadcast_api reputation_api | |
| plugin = market_history_api condenser_api block_api rc_api | |
| history-disable-pruning = 0 | |
| account-history-rocksdb-path = "blockchain/account-history-rocksdb-storage" |
I hereby claim:
To claim this, I am signing this object:
| import requests | |
| from lightsteem.client import Client | |
| import random | |
| def get_proxy_votes(c, username): | |
| account_detail = c.get_accounts([username])[0] | |
| if account_detail["proxy"]: | |
| # print(f"proxy found, checking {account_detail['proxy']}") | |
| return get_proxy_votes(c, account_detail["proxy"]) |
| import requests | |
| def test_last_head(): | |
| appbase_node = "https://api.steemit.com" | |
| global_properties = requests.post( | |
| appbase_node, | |
| json={ | |
| "jsonrpc": "2.0", |
| from steem import Steem | |
| from steem.account import Account | |
| from steem.amount import Amount | |
| from steem.converter import Converter | |
| import logging | |
| logger = logging.getLogger('producer rewards') | |
| logger.setLevel(logging.INFO) | |
| logging.basicConfig() |
| from steem import Steem | |
| from steembase.account import PasswordKey | |
| def create_account(steemd_instance, new_account, new_account_master_key, creator): | |
| steemd_instance.create_account( | |
| new_account, | |
| delegation_fee_steem="1 STEEM", | |
| password=new_account_master_key, | |
| creator=creator, |
| const steem = require('steem'); | |
| function getHistory(account, from, limit, reward, opCount) { | |
| steem.api.getAccountHistory(account, from, limit, function (err, result) { | |
| if (err) { | |
| console.log('ERR'); | |
| console.log(err); | |
| return | |
| } |
| from dateutil.parser import parse | |
| from datetime import datetime | |
| def get_voting_power(account_data): | |
| last_vote_time = parse(account_data["last_vote_time"]) | |
| diff_in_seconds = (datetime.utcnow() - last_vote_time).seconds | |
| regenerated_vp = diff_in_seconds * 10000 / 86400 / 5 | |
| total_vp = (account_data["voting_power"] + regenerated_vp) / 100 | |
| if total_vp > 100: |