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/4upkeh


파이썬 문자열에서 특정 문자열을 다른 문자열로 대체하는 방법입니다. replace()를 사용합니다. 예시를 보면 금방 알 수 있습니다.

my_string = 'Hello. My name is John.'
# my_string의 'Hello'를 'Good morning'으로 대체하여 new_string에 할당
new_string = my_string.replace('Hello','Good morning')
print(new_string)

Good morning. My name is John.

# my_string의 마침표(.)를 느낌표로 대체하여 new_string에 할당
new_string = my_string.replace('.','!')
print(new_string)

Hello! My name is John!

별도의 옵션이 없으면 일치하는 모든 문자열을 대체합니다. 만약 위의 예시에서 처음에 나온 마침표 1개만 바꾸려면 최대 회수를 지정해 줍니다.

# 처음에 나온 1개만 대체
new_string = my_string.replace('.','!',1)
print(new_string)

Hello! My name is John.

Comments

Popular posts from this blog

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

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

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