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...

파이썬에서 텍스트 파일 쓰기

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


파이썬에서 텍스트 파일을 쓰는 방법입니다. 지난번에 썼던 텍스트 파일 읽기에서 이어지는 내용입니다.

파이썬에서 텍스트 파일 읽기 https://steemit.com/hive-141029/@joviansummer/2v14rm

파일에 쓰려면 open() 함수로 파일을 열때 쓰기(w) 또는 이미 저장된 내용 뒤에 추가하기(a) 모드로 설정하면 됩니다.

# test.txt 파일을 쓰기 모드로 열고 파일 객체를 f에 할당
f = open('test.txt', 'w')

파일을 쓰기(w) 모드로 열어서 작업하면 이전에 저장되어 있던 내용이 있을 경우에는 삭제가 됩니다. 내용이 있는 파일 뒤에 새로운 내용을 덧붙이려면 추가하기(a) 모드로 열면 됩니다.

이제 문자열을 파일에 쓸 수 있습니다. 여러 줄로 내용을 쓸 경우 줄바꿈('\n')을 추가해 줍니다.

# 문자열 쓰기
f.write('hello world.\n')
f.write('testing file operation.\n')

작업이 끝나면 잊지 말고 파일 객체를 닫아줍니다.

f.close()

Comments

Popular posts from this blog

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

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

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