728x90
๋ฐ˜์‘ํ˜•

1) ํŒŒ์ด์ฌ ์‹คํ–‰ ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ

 

1. ๋จผ์ € ์ฝ”๋“œ๋ฅผ gpt์— ์ž…๋ ฅํ•˜๋“ , ์ž์‹ ์ด ์ฐพ์•„๋ณด๋“ , ๋งŒ๋“ค๋“ ํ•ด์„œ ์ฝ”๋“œ๋ฅผ ์™„์„ฑํ•˜๊ณ  ์‹คํ–‰ ์‹œํ‚ต๋‹ˆ๋‹ค. (์ฝ”๋“œ ์‹คํ–‰๋˜์–ด์•ผ ๊ฐ€๋Šฅ)

import tkinter as tk
import datetime


class CountdownApp:
    def __init__(self, master):
        self.master = master
        self.master.title("์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ ํ•„๊ธฐ ํ•ฉ๊ฒฉ ๊ฐ€๋ณด์ž๊ณ !")
        self.master.attributes("-fullscreen", True)
        self.end_date = datetime.datetime(2023, 5, 13)
        self.remaining_time_str = tk.StringVar(value=self.get_remaining_time())
        self.remaining_time_label = tk.Label(
            self.master,
            textvariable=self.remaining_time_str,
            font=("Arial", 96),
            fg="blue",
            bg="gray",
        )
        self.remaining_time_label.pack(pady=20)

        # Create image label
        self.image_label = tk.Label(self.master)
        self.image_label.pack(pady=10)

        self.message_label = tk.Label(
            self.master,
            text="์กฐ์ˆ˜ํ˜„ ์•„์ž์•„์ž ํ™”์ดํŒ…!",
            font=("Arial", 48),
            fg="white",
            bg="green",
        )
        self.message_label.pack(pady=10)

        # Load image and set it to the image label
        self.kakao_image = tk.PhotoImage(file="shsu.png")
        self.image_label.configure(image=self.kakao_image)

        self.countdown()


    def get_remaining_time(self):
        remaining = self.end_date - datetime.datetime.now()
        days, seconds = remaining.days, remaining.seconds
        hours = seconds // 3600
        minutes = (seconds % 3600) // 60
        seconds = seconds % 60
        remaining_time = f"{days:02}:{hours:02}:{minutes:02}:{seconds:02}"
        return remaining_time

    def countdown(self):
        self.remaining_time_str.set(self.get_remaining_time())
        if datetime.datetime.now() >= self.end_date:
            self.remaining_time_str.set("Time's up!")
            return
        self.master.after(1000, self.countdown)


if __name__ == "__main__":
    root = tk.Tk()
    app = CountdownApp(root)
    root.mainloop()
 

๊ฒฐ๊ณผ๋Š” ์ด๋ ‡๊ฒŒ ๋‚˜์˜ค๊ตฌ์—ฌ~~ ์ด๊ฑธ ํŒŒ์ผ๋กœ ๋งŒ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!! (์ •์ฒ˜๊ธฐ ์ค€๋น„ํ•˜์‹œ๋Š”๋ถ„๋“ค ํŒŒ์ด๋ง)

 

2. ํ„ฐ๋ฏธ๋„์—  pip install pyinstaller์„ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค

 

3. ๊ทธ ํ›„์— pyinstaller -w ํŒŒ์ผ๋ช…(countdown_gosim.py)์„ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค

 

4. ๋งˆ์ง€๋ง‰์œผ๋กœ dist ์•ˆ์— ์žˆ๋Š” ์ฑ… ๋ชจ์–‘ ์‹คํ–‰ ํŒŒ์ผ์„ ์ฐพ์•„์„œ ์—ด์–ด์ฃผ๋ฉด ํŒŒ์ด์ฌ์ด ์—†์–ด๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์‹คํ–‰ ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ ๋!!!

 

 

2)  chat gpt๋ฅผ vscode ์•ˆ์œผ๋กœ ๋ฐ๋ฆฌ๊ณ  ์˜ค๊ธฐ๐Ÿ‘

 

(421) ChatGPT๋ฅผ VSCode์•ˆ์œผ๋กœ ๋ฐ๋ฆฌ๊ณ  ์˜ค์ž | ์ธ๊ณต์ง€๋Šฅ ์ฝ”๋”ฉ - YouTube

์ด ์˜์ƒ์„ ์ฐธ๊ณ ํ•˜์˜€์Šต๋‹ˆ๋‹ค ใ…Žใ…Žใ…Ž ๋˜‘๋˜‘ํ•œ gpt์”Œ๐Ÿ˜

 https://platform.openai.com/account/api-keys

 

OpenAI API

An API for accessing new AI models developed by OpenAI

platform.openai.com

1. ์š” ๋งํฌ ๋“ค์–ด๊ฐ€์…”์„œ ํ‚ค๋ฅผ ๋งŒ๋“ค๊ณ  ๋ณต์‚ฌ๋ฅผ ํ•œํ›„์—

2. ์„ค์ •(Setting) ๋“ค์–ด๊ฐ€์…”์„œ Goto Location: Alternative Definition Command ๋ฐ‘์— ๋ณต์‚ฌํ•œ ํ‚ค๋ฅผ ๋ณต์‚ฌ๋ถ™์—ฌ๋„ฃ๊ธฐ ํ•˜๋ฉด ๋!!3.

 

++chat gpt๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ๋ฐฉ๋ฒ•์€ ์ด๋Ÿฌ์ด๋Ÿฌํ•ฉ๋‹ˆ๋‹น

728x90
๋ฐ˜์‘ํ˜•

+ Recent posts