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

파이썬에서 json 파일 읽기/쓰기

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


파이썬에서 json 파일을 읽고 쓰는 방법입니다. 전에 썼던 딕셔너리(dict)/json 변환을 파일에 대해서 수행한다고 보면 되겠습니다.

파이썬에서 json 형식 문자열(str) - 딕셔너리(dict) 변환 https://steemit.com/hive-141029/@joviansummer/json-str-dict

먼저 json 형식의 파일을 읽어서 딕셔너리에 할당하는 방법입니다. 아래와 같이 할 수 있습니다.

import json

# test.json 파일을 읽기(r) 모드로 열기
f = open('test.json', 'r')
# 파일의 내용을 딕셔너리로 변환하여 test_data에 할당
test_data = json.load(f)
# 파일 닫기
f.close()

반대로 딕셔너리 데이터를 json 파일로 저장하려면 아래와 같이 할 수 있습니다.

x_dict = {'a':1, 'b':2, 'c':3}
# test2.json 파일을 쓰기(w) 모드로 열기
f = open('test2.json', 'w')
# x_dict를 json 파일로 저장
json.dump(x_dict, f)
# 파일 닫기
f.close()

Comments

Popular posts from this blog

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

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

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