by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-2-1-investor-s-relief-experiment-on-separation-of-investment-and-sns Hello, this is @joviansummer(witness: @jswit). I'm starting a new experiment regarding my @jsup vote service. The purpose of this experiment is to separate STEEM investment and social interaction(posting/commenting). For many people, writing a post daily(literally 365 posts per year) is not easy. It's not fun, and mandatory daily post only written for self-voting delegation service tends to result in useless low-quality content. I hope this new function of @jsup will reduce those posts, and also make it a bit more easy to invest in STEEM without worrying about daily posting. I think pressure of daily posting significantly undermines Steem as SNS. It's not fun. This is how it works: From 11:45 PM to 11:50 PM every night(reference time zone is GMT+9), @jsup checks if eligible delegators wrote something and received daily v...
파이썬에서 텍스트 파일의 특정 행에 있는 내용 출력 - enumerate
- Get link
- X
- Other Apps
by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/enumerate
파이선에서 텍스트 파일의 특정 행에 있는 내용을 출력하려면 enumerate() 함수를 이용해서 행번호와 그 행의 문자열을 가져온 후 조건을 적용하여 출력할 수 있습니다. 여기서 행번호는 0번부터 시작한다는 점에 유의해야 합니다. 즉, 0번행이 첫번째 행입니다.
예를 들어 my_data.txt 파일에서 3번째부터 10번째행을 출력하고 싶다면, 행번호는 0부터 시작하므로 2번부터 9번까지 출력하면 될 것입니다. 아래의 코드와 같이 할 수 있습니다.
f = open('my_data.txt', 'r')
for i, line in enumerate(f):
if i >= 2 and i <= 9:
print(line.rstrip())
if i == 10:
break
f.close()
위의 코드를 보면 파일에서 읽은 문자열을 line 변수에 할당하는데, 출력하는 print() 함수에서 줄바꿈을 추가해 주기 때문에 파일에서 읽은 내용에서 줄바꿈 기호(\n)는 rstrip() 함수를 이용해서 제거했습니다.
행번호 9번까지 출력하고자 했기 때문에 10번부터는 굳이 파일을 더 읽을 필요가 없습니다. 따라서 행번호가 10이면 break로 루프를 빠져나오고 파일을 닫습니다.
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기
Posted through the AVLE Dapp (https://avle.io)
- Get link
- X
- Other Apps
Popular posts from this blog
스티미언의 영향력 지수 계산
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/5qvaqw 오늘 이런 저런 생각을 하다가 문득 떠오른 내용인데, 잊어버리기 전에 적어 둡니다. 스티미언이 스팀 생태계에 행사할 수 있는 정량적인 영향력에 대해 생각해 보았습니다. 좋은 글을 많이 썼다거나 서비스를 개발했다거나 아는 사람이 많다거나 이런 정성적인 영향력과는 별도로, 수량으로 표시할 수 있는 영향력에 대한 것입니다. 일단 직접적인 수량은 보유한 스팀파워입니다. 예를 들어 50만sp를 보유하고 있다면, 아마 고래라고 칭해도 될 것 같습니다. 그런데, 조금 더 생각해 보면 영향력을 보유한 스팀파워만으로 측정하여 고래라고 간주하는 것은 과도하게 단순화시킨 감이 없지 않습니다. 현재 수량화된 측면에서 스팀 생태계에 영향력을 행사할 수 있는 방법은 2가지가 있습니다. 이 2가지 방법은 스팀파워를 지닌 스티미언 모두에게 유효합니다. 첫번째 방법은 업보팅입니다. 스티미언은 나에게 크게 보팅해 주는 사람의 의견에 영향을 받을 수밖에 없습니다. 큰 스팀파워로 보팅해 주는 스티미언이 많을 수록 커뮤니티가 활성화되고 신규 사용자가 유입될 가능성이 높아집니다. 방글라데시 커뮤니티가 실제 사례라고 할 수 있을 것 같습니다. @jungjunghoon님의 일파만파 운동은 보팅의 영향력을 확대하여 커뮤니티를 활성화하려는 시도라고 생각됩니다. @jsup의 후원 보팅 기능도 이러한 취지로 개발되었습니다. 두번째 방법은 증인투표입니다. 스팀 블럭체인은 증인들이 운영하는 서버(증인 노드)에 의해 유지되기 때문에, 누가 블럭체인을 유지할 것인지를 결정하는 증인투표는 일종의 주권 행사라고 할 수 있습니다. 최상위 증인 20명은 한달에 약 1만스팀을 증인 보상으로 받게 됩니다. 서버 운영비를 충당해야 되므로 1만스팀 전체가 수익이 되는 것은 아니지만 그래도 상당한 수입입니다. 하위 증인들은 순위에 따라 보상을 받는데 21위라고 해도 한달에 ...
GentBG - why bother to burn STEEM?
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-why-bother-to-burn-steem GentBG - a new experiment to burn STEEM Hello, this is @joviansummer(witness: @jswit). I'd like to briefly explain why I bothered to start @gentbg experiment. Unlike bitcoin, STEEM has no supply limit. As long as STEEM exists, newly minted STEEM will be added to total supply. If we can't maintain corresponding demand or reduce supply, downward pressure on STEEM price can be a big challenge. @gentbg project is an experiment to reduce STEEM supply by burning. @gentbg will burn liquid author reward and delegate SP reward to @jsup to get amplified upvotes. The main purpose is to create a perpetual STEEM burning loop. I added a bit of fun factor via AI-generated images, to incentivize giving upvotes to @gentbg's posts. If you have some spare voting power, you can contribute to burning STEEM by giving upvotes to @gentbg's posts. Initial run of this experiment wil...
jsup.GEN - working on image-to-image generation with AI
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-gen-working-on-image-to-image-generation-with-ai Hello, this is @joviansummer(witness: @jswit). I'd like to share what I'm working on regarding my experintal jsup.GEN project, which tries to connect image generation AI with Steemit. Currently, jsup.GEN provide function to generate image from test prompt(txt2img). This function is interesting, but it's not easy to generate exactly what you want because you need to explain the image in detail with multiple keywords in English. Thus, I think it's more useful to have a function to generate image from existing reference image. I'm working on this image-to-image function, and thinking about two methods to implement it. The first method is to provide 2 commands as follows: !gen_t : This command focuses more on text prompt than reference image. The result may be quite different from reference because text prompt will have much more in...
Comments
Post a Comment