두 개의 행에 있는 데이터를 한 개의 행으로 만들기 INDEX($A$2:$E$3,MOD(COLUMN(B$1),2)+1,ROUNDUP(COLUMN(A$1)/2,0)) 응용 3개의 행 데이터를 1개의 행 데이터로 =INDEX($A$2:$D$4,MOD(COLUMN(C$1),3)+1,ROUNDUP(COLUMN(A$1)/3,0)) 놀아보자/Excel 2023.04.04
Discord 챗봇 view_3/3 import discord from discord.ui import Button, View from discord.ext import commands intents = discord.Intents.default() intents.message_content = True bot = commands.Bot(command_prefix=">", intents=intents) Interaction : discord.Interaction = discord.Interaction class MusicView(View): @discord.ui.button(label = "애국가", style = discord.ButtonStyle.green, emoji="✌") async def button_1_callback(self.. 놀아보자/파이썬기초 2022.08.09
Discord 챗봇 view_2/3 import discord from discord.ui import Button, View from discord.ext import commands intents= discord.Intents.default() intents.message_content= True bot= commands.Bot(command_prefix=">", intents=intents) Interaction: discord.Interaction= discord.Interaction @bot.command() async def ping(ctx): await ctx.send("pong") @bot.command() async def 애국가(ctx): view= MyView() await ctx.send("애국가1절부터 4절입니다.".. 놀아보자/파이썬기초 2022.08.09
Discord 챗봇 view_1/3 import discord from discord.ui import Button, View from discord.ext import commands intents= discord.Intents.default() intents.message_content= True bot= commands.Bot(command_prefix=">", intents=intents) Interaction: discord.Interaction= discord.Interaction class MyView(View): @discord.ui.button(label= "애국가 1절", style= discord.ButtonStyle.primary, emoji="✌") async def button_1_callback(self, but.. 놀아보자/파이썬기초 2022.08.09
Discord 챗봇 동작 테스트 import discord from discord.ext import commands intents = discord.Intents.default() intents.message_content = True bot = commands.Bot(command_prefix=">", intents=intents) @bot.command() async def ping(ctx): await ctx.send("pong") @bot.command() async def test(ctx): await ctx.send("테스트 성공") bot.run('자신의 토큰 입력') 놀아보자/파이썬기초 2022.08.09
MediaPipe Hands 테스트 1. 모듈/패키지등의 간섭을 피하기 위해 가상환경에서 실행 2. 필요 모듈 : - opencv-contrib-python - mediapipe 3. 웹캠을 이용한 MediaPipe Hands 추적 테스트 코드 출처 : https://google.github.io/mediapipe/solutions/hands Hands Cross-platform, customizable ML solutions for live and streaming media. google.github.io import cv2 import mediapipe as mp mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles mp_hands.. 놀아보자/인공지능 2022.05.02