GentBG x PUSSTEEM - burning both STEEM and PUSS

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-x-pussteem-burning-both-steem-and-puss Hello, this is @joviansummer(witness: @jswit), developer of GentBG project. I registered @gentbg account to PUSSTEEM about a week ago and donated some of my own PUSS token to @gentbg's EPUSS account. Now, @gentbg will burn STEEM and EPUSS at the same time. PUSSTEEM's boosting upvotes will help increasing baseline burning significantly. @gentbg's SP reward is delegate to @jsup to get automated upvotes, forming a baseline burning of liquid reward independent of other people's upvotes. Some may argue 100%(both liquid and SP reward) burning is much better, but I chose this approach to prevent @gentbg from becoming a spamming account. Constantly asking for upvotes via mentioning and commenting every week may eventually become a big annoyance to curators. That being said, anyone is welcome to participate in countering STEEM inflation by giving upvotes ...

파이썬에서 실행중인 프로세스 확인

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포스팅 강박에서 벗어나기