일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Github
- dataframe
- list
- c#
- GIT
- SQL
- numpy
- Python
- google apps script
- hive
- PANDAS
- Kotlin
- matplotlib
- Redshift
- Java
- Excel
- PostgreSQL
- gas
- Apache
- string
- Tkinter
- Google Spreadsheet
- PySpark
- Google Excel
- math
- Mac
- django
- array
- 파이썬
- Today
- Total
목록분류 전체보기 (832)
달나라 노트
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/tAXOM/btrtZ7iEwUr/Uu1mVQcTVJL39e9GX7Q4z1/img.png)
Heroku에서 discord app을 hosting한 경우 처음에는 무료 시간을 사용하게 됩니다. 무료시간은 다음과 같습니다. 기본 무료 시간 = 550시간 카드 등록한 경우 = 450시간 추가 (-> 총 1000시간의 무료 시간 획득 가능) 먼저 Heroku 홈페이지를 이용하는 방법입니다. Heroku 홈페이지 진입 후 로그인을 해줍시다. 로그인을 한 후 우측 상단에 프로필을 클릭하여 Account settings 버튼을 클릭합니다. 그리고 Billing 탭을 클릭하면 위같은 화면이 나옵니다. 화면을 살펴보면 빨간색으로 표시된 부분에서 지금 1000시간의 무료 시간이 남아있다는 것을 볼 수 있습니다. 이렇게 Free Dyno Usage에서 무료 시간 관련 내용을 볼 수 있습니다. terminal을 이..
Python time 모듈의 sleep method는 Python 코드의 실행을 몇 초 동안 일시정지하는 기능을 가집니다. import time time.sleep(second) 사용법은 간단합니다. sleep method에 sleep할 초를 적어주면 됩니다. import time import datetime dttm_now = datetime.datetime.now() print(dttm_now) time.sleep(20) dttm_now = datetime.datetime.now() print(dttm_now) -- Result 2022-02-22 00:03:49.997681 2022-02-22 00:04:09.999083 위 코드는 약 20초간 sleep하는 코드입니다. 처음에 print되는 현재 ..
Python discord API를 사용할 때 어떤 메세지의 작성자를 불러오는 방법이 있습니다. 먼저 discord.ext.commands를 사용하는 경우입니다. from discord.ext import commands discord_token = 'token_string' client = commands.Bot(command_prefix='/') @client.event async def on_ready(): print('{} logged in.'.format(client)) print('Bot: {}'.format(client.user)) print('Bot name: {}'.format(client.user.name)) print('Bot ID: {}'.format(client.user.id)) ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/mlC12/btrtNSmB8vj/4xMdH8KRMaCr4kvj2g2uA0/img.png)
Python으로 만든 Discord Bot의 프로필 이미지를 변경해봅시다. 원래 Bot의 프로필 이미지는 위같은 기본 이미지였습니다. 저는 그냥 간단하게 위같은 단색 이미지로 바꾸려고 합니다. 첫 번째로는 discord 개발자 페이지를 이용하는 방법을 사용해봅시다. Discord 개발자 페이지 = https://discord.com/developers/applications 먼저 Discord 개발자 페이지로 들어가서 본인의 discord ID로 로그인해줍시다. 그러면 Applications 메뉴에 My Applications 부분을 보면 현재 내 아이디로 만들어진 Bot들이 나옵니다. 저는 Cake란 이름의 Bot 프로필 이미지를 변경할겁니다. Cake App을 클릭해줍시다. 그러면 위같은 화면이 나오..