STEEM POWER retention ratio of top 50 witnesses

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/steem-power-retention-ratio-of-top-50-witnesses Hello, this is @joviansummer(witness: @jswit). Some time ago there was a bit of discussion on discord witness chanel about witnesses' power-down/cashing-out. So out of curiosity I just checked current ratio of witnesses' own STEEM POWER(VESTS) and all-time producer reward(VESTS). The ratio is calculated by the following simple formula: ratio(%) = account's own SP(MV) / all-time producer reward SP(MV) * 100% Ratio value less than 100% indicates power-down. If witness does additional power-up or gets other types of reward(e.g., curation reward), the ratio may exceed 100%. This does not take witness' other accounts into consideration. All-time producer reward data is from @steemchiller's SDS API. Here is the result: rank account own_sp prod_sp ratio 1 justyy 2188.411MV 1284.2MV 170.41% 2 steemchiller 982.134MV 124...

파이썬에서 json 파일 읽기/쓰기

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/json


파이썬에서 json 파일을 읽고 쓰는 방법입니다. 전에 썼던 딕셔너리(dict)/json 변환을 파일에 대해서 수행한다고 보면 되겠습니다.

파이썬에서 json 형식 문자열(str) - 딕셔너리(dict) 변환 https://steemit.com/hive-141029/@joviansummer/json-str-dict

먼저 json 형식의 파일을 읽어서 딕셔너리에 할당하는 방법입니다. 아래와 같이 할 수 있습니다.

import json

# test.json 파일을 읽기(r) 모드로 열기
f = open('test.json', 'r')
# 파일의 내용을 딕셔너리로 변환하여 test_data에 할당
test_data = json.load(f)
# 파일 닫기
f.close()

반대로 딕셔너리 데이터를 json 파일로 저장하려면 아래와 같이 할 수 있습니다.

x_dict = {'a':1, 'b':2, 'c':3}
# test2.json 파일을 쓰기(w) 모드로 열기
f = open('test2.json', 'w')
# x_dict를 json 파일로 저장
json.dump(x_dict, f)
# 파일 닫기
f.close()

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기