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/6bcyk7


파이썬에서 실행중인 프로세스를 확인하는 방법입니다. psutil 모듈을 이용합니다.

import psutil
# 실행중인 프로세스를 순차적으로 검색
for proc in psutil.process_iter():
  # 프로세스 이름을 ps_name에 할당
  ps_name = proc.name()
  # 실행 명령어와 인자(argument)를 리스트 형식으로 가져와 cmdline에 할당
  cmdline = proc.cmdline()
  print('NAME:', ps_name, ' CMD:', cmdline)

프로세스 이름은 name(), 실행 명령어는 cmdline() 함수를 사용해서 리스트 가져옵니다. 위의 예시를 조금 구체화해서, 실행중인 파이썬 스크립트가 있는지 찾아보고 해당 스크립트의 실행 명령을 출력할 수 있습니다.

for proc in psutil.process_iter():
  ps_name = proc.name()
  if ps_name == 'python3':
    cmdline = proc.cmdline()
    print(cmdline)

Comments

Popular posts from this blog

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

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

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