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

파이썬에서 스택(stack) 사용

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


파이선에서 리스트(list) 형식을 스택(stack)으로 사용할 수 있습니다. 데이터를 하나씩 추가하고, 사용하기 위해 뺄 때는 가장 나중에 추가된 데이터부터 역순으로 빼 오는 방식입니다.

리스트에서 데이터를 추가하기 위한 append()가 있고, 마지막 데이터를 가져온 후에 삭제하는 pop()이 있기 때문에 간편하게 스택으로 사용할 수 있습니다. 간단한 예시를 보겠습니다.

# 리스트 초기화
x = []
# 데이터 추가
x.append('abc')
x.append('def')

# 몇개의 데이터가 추가되었는지 확인
print(len(x))

# 리스트 내용 출력
print(x)

['abc', 'def']

리스트에 저장된 원소의 인덱스값을 -1로 지정하면 가장 마지막 원소를 지칭하므로, 마지막에 저장된 데이터는 x[-1]에 있습니다.

# 마지막에 저장된 데이터 출력(삭제는 하지 않음)
print(x[-1])

'def'

데이터를 꺼내서 변수 y에 저장해 봅니다.

y = x.pop()

이제 y에는 문자열 'def'가 저장되어 있고, x는 원소가 하나 줄어서 ['abc'] 이렇게 됩니다.

print(x)

['abc']

print(y)

'def'

순차적으로 가져온 데이터를 역순으로 하나씩 처리해야 할 때 편리합니다.


@joviansummer의 스팀 프로젝트

스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)

jswit 증인 노드 프로젝트를 시작합니다.

jsup 업보팅(upvoting) 서비스 소개

jsup 수혜자 지정 기능 추가

Comments

Popular posts from this blog

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

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

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