openclaw와 telegram 조합으로 동료가 쓰고 있어서

비슷하게 해보려다가 claude 도 막혔지 이래저래 귀찮아서

local LLM + telegram 으로 하려다가

이래저래 귀찮아서(!)

local LLM은 ollama로 딸깍~ 하고

python + python-telegram-bot 조합으로 메신저 통신을 뚫고

수신한 메시지를 ollama의 가벼운 모델(일단 gemma3) 로 던지고

검색이 들어간 문장이 오면 검색을 제외한 단어를 인터넷 검색후(python + selenium)

결과를 다시 약간의 프롬프트와 합쳐 ollama로 던지고

응답을 받으면 메신저로 쏴주는 식으로 구현하니 나름 이렇게 에이전트를 만드는 거구나 싶어서

다른 ai 클라이언트나 에이전트들은 어떻게 만들어졌나 뜯어보고 싶어지네.

 

selenium은 wget 등으로 다음/네이버/구글 url + query 식으로 하면

바로 이동하지 않고 javascript를 통해 추가 링크로 이동하게 되어있어서 쓸 수 없다 보니

request 패키지로는 작동하지 않아 selenium을 쓸 수 밖에 없네..

 

[링크 : https://python-telegram-bot.org/]

 

telegram bot을 이용해서 메시지 보내는 방법

import asyncio
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, MessageHandler, filters
from telegram.constants import ChatAction

async def handler(update: Update, context: ContextTypes.DEFAULT_TYPE):
    chat_id = update.effective_chat.id

    # "입력 중..." 표시
    await context.bot.send_chat_action(chat_id=chat_id, action=ChatAction.TYPING)

    # 실제 작업 흉내 (지연)
    await asyncio.sleep(3)

    # 메시지 전송
    await update.message.reply_text("처리 완료!")

app = ApplicationBuilder().token("TOKEN").build()
app.add_handler(MessageHandler(filters.TEXT, handler))
app.run_polling()

[링크 : https://chatgpt.com/share/69d7a89e-0328-8322-aa93-5274cef6d386]

 

telegram bot 에 보낸 메시지 받는 방법(버전이 구버전 예제로 실행은 안됨)

from telegram.ext import Updater, MessageHandler, Filters

def handle_msg(update, context):
    print(update.message.text)

updater = Updater("BOT_TOKEN", use_context=True)
dp = updater.dispatcher

dp.add_handler(MessageHandler(Filters.text, handle_msg))

updater.start_polling()
updater.idle()

[링크 : https://chatgpt.com/share/69d7a934-835c-8320-b493-e07c126e9cd5]

 

python  에서 ollama 라이브러리를 이용하여 llama3 에게 물어보는 예제 코드

import ollama

response = ollama.chat(
    model='llama3',
    messages=[
        {
            'role': 'user',
            'content': '문제를 단계별로 생각 과정을 포함해서 풀어줘'
        }
    ]
)

print(response['message']['content'])

[링크 : https://chatgpt.com/share/69d7a89e-0328-8322-aa93-5274cef6d386]

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

python 으로 telegram + fatherbot 연동하기  (0) 2026.04.08
ollama 설치  (2) 2026.04.08
antigravity artifact  (0) 2026.03.18
agi를 느꼈다?  (0) 2026.02.24
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
Posted by 구차니

ollama 설치

curl -fsSL https://ollama.com/install.sh | sh
ollama run gemma3:1b

 

python 라이브러리 설치

pip3 install ollama 
pip3 install python-telegram-bot

 

telegram bot 생성 및 token 얻기

[링크 : https://midoriiroplace.tistory.com/62] fatherbot 으로 텔레그램 봇 만들기(token 획득)

 

python 소스코드

import ollama
from telegram import Update
from telegram.ext import filters, MessageHandler, ApplicationBuilder, ContextTypes, CommandHandler

APIKEY='{{사용자 토큰}}'

async def echo(update: Update, context: ContextTypes.DEFAULT_TYPE):
    response =  ollama.chat(model="gemma3:1b", messages=[{'role':'user','content':update.message.text}])
    await context.bot.send_message(chat_id=update.effective_chat.id, text=response['message']['content']
)

if __name__ == '__main__':
    application = ApplicationBuilder().token(APIKEY).build()
    
    echo_handler = MessageHandler(filters.TEXT & (~filters.COMMAND), echo)
    application.add_handler(echo_handler)

    application.run_polling()

----

 

[링크 : https://dev-astra.tistory.com/490]

[링크 : https://midoriiroplace.tistory.com/62] fatherbot 으로 텔레그램 봇 만들기(token 획득)

[링크 : https://midoriiroplace.tistory.com/63] python으로 메시지 보내기 (chatid 획득)

[링크 : https://midoriiroplace.tistory.com/70]

[링크 : https://naradora78.tistory.com/39] 구버전 api 라서 현재 사용불가

 

[링크 : https://pypi.org/project/python-telegram-bot/]

 

gpt가 짜준게 이거 기반인 것 같은디..

가장 위에 소스로는 응답이 없고, 아무튼.. echo 얘제는 아래를 참고하면된다.

그러면.. 받고 이걸 ollama에 넘겨주고 받으면 되는건가..?

import logging
from telegram import Update
from telegram.ext import filters, MessageHandler, ApplicationBuilder, ContextTypes, CommandHandler

logging.basicConfig(
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    level=logging.INFO
)

async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
    await context.bot.send_message(chat_id=update.effective_chat.id, text="I'm a bot, please talk to me!")

async def echo(update: Update, context: ContextTypes.DEFAULT_TYPE):
    await context.bot.send_message(chat_id=update.effective_chat.id, text=update.message.text)


if __name__ == '__main__':
    application = ApplicationBuilder().token('USER_TOKEN').build()
    
    start_handler = CommandHandler('start', start)
    application.add_handler(start_handler)

    echo_handler = MessageHandler(filters.TEXT & (~filters.COMMAND), echo)
    application.add_handler(echo_handler)

    application.run_polling()

 

[링크 : https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions---Your-first-Bot]

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

python + telegram + ollama + selenium  (0) 2026.04.09
ollama 설치  (2) 2026.04.08
antigravity artifact  (0) 2026.03.18
agi를 느꼈다?  (0) 2026.02.24
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
Posted by 구차니

intel cpu 인데 내장 그래픽은 역시 버리는건가..(!)

 

$ curl -fsSL https://ollama.com/install.sh | sh
>>> Installing ollama to /usr/local
[sudo] minimonk 암호: 
>>> Downloading ollama-linux-amd64.tar.zst
######################################################################## 100.0%
>>> Creating ollama user...
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
Created symlink /etc/systemd/system/default.target.wants/ollama.service → /etc/systemd/system/ollama.service.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.
WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode.

 

$ ollama 
Ollama 0.20.3                                       
                                                    
  Chat with a model                                 
    Start an interactive chat with a model          
                                                    
  Launch Claude Code (not installed)                
    Anthropic's coding tool with subagents          
                                                    
  Launch Codex (not installed)                      
    OpenAI's open-source coding agent               
                                                    
  Launch OpenClaw (install)                         
    Personal AI with 100+ skills                    
                                                    
  Launch OpenCode (not installed)                   
    Anomaly's open-source coding agent              
                                                    
  Launch Droid (not installed)                      
    Factory's coding agent across terminal and IDEs 
                                                    
▸ Launch Pi (install)                               
    Press enter to install                          
                                                    
                                                    
↑/↓ navigate • enter launch • → configure • esc quit

 

$ ollama 
Select model to run: Type to filter...                                          
                                                                                
  Recommended                                                                   
  ▸ kimi-k2.5:cloud                                                             
      Multimodal reasoning with subagents                                       
    qwen3.5:cloud                                                               
      Reasoning, coding, and agentic tool use with vision                       
    glm-5:cloud                                                                 
      Reasoning and code generation                                             
    minimax-m2.7:cloud                                                          
      Fast, efficient coding and real-world productivity                        
    gemma4                                                                      
      Reasoning and code generation locally, ~16GB, (not downloaded)            
    qwen3.5                                                                     
      Reasoning, coding, and visual understanding locally, ~11GB, (not downloade
                                                                                
↑/↓ navigate • enter select • ← back                         
$ ollama 
Download gemma4?                         
                                         
   Yes    No                             
                                         
←/→ navigate • enter confirm • esc cancel

 

메모리도 작고(16GB) cpu로 돌릴거라 취소!

pulling manifest 
pulling 4c27e0f5b5ad:  40% ▕███████           ▏ 3.9 GB/9.6 GB   11 MB/s   8m11s

 

[링크 : https://goddaehee.tistory.com/]

[링크 : https://ollama.com/download]

[링크 : https://ollama.com/search]

 

+

일단 돌릴 테스트니까  1B던 3B던 상관없으니 시작

그런데 아까 위에 메뉴에서는 왜 gemma만 보이고 이제 llama는 안보이는걸까?

일단은.. updated 1 years ago 인거 봐서 최신으로만 보여주는걸려나?

$ ollama run llama3.2
pulling manifest 
pulling dde5aa3fc5ff:  70% ▕████████████      ▏ 1.4 GB/2.0 GB   20 MB/s     29s

[링크 : https://ollama.com/library/llama3.2]

 

으아아 컴퓨터 녹는다 ㅋㅋㅋ

그래도 초당 2~3 단어 정도 나오는 느낌인데 이정도만 해도 그냥 대화하는 느낌 속도라

그거보다 빠르면 읽기도 전에 말이 더 빠르게 나올 듯?

 

Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

 

다시 실행하니 내가 받아둔 모델이 뜬다.

$ ollama 
Select model to run: Type to filter...                                            
                                                                                  
  Recommended                                                                     
    gemma4                                                                        
      Reasoning and code generation locally, ~16GB, (not downloaded)              
    qwen3.5                                                                       
      Reasoning, coding, and visual understanding locally, ~11GB, (not downloaded)
    kimi-k2.5:cloud                                                               
      Multimodal reasoning with subagents                                         
    qwen3.5:cloud                                                                 
      Reasoning, coding, and agentic tool use with vision                         
    glm-5:cloud                                                                   
      Reasoning and code generation                                               
    minimax-m2.7:cloud                                                            
      Fast, efficient coding and real-world productivity                          
                                                                                  
  More                                                                            
  ▸ llama3.2                                                                      
                                                                                  
↑/↓ navigate • enter select • ← back                  

 

 

$ ollama --help
Large language model runner

Usage:
  ollama [flags]
  ollama [command]

Available Commands:
  serve       Start Ollama
  create      Create a model
  show        Show information for a model
  run         Run a model
  stop        Stop a running model
  pull        Pull a model from a registry
  push        Push a model to a registry
  signin      Sign in to ollama.com
  signout     Sign out from ollama.com
  list        List models
  ps          List running models
  cp          Copy a model
  rm          Remove a model
  launch      Launch the Ollama menu or an integration
  help        Help about any command

Flags:
  -h, --help         help for ollama
      --nowordwrap   Don't wrap words to the next line automatically
      --verbose      Show timings for response
  -v, --version      Show version information

Use "ollama [command] --help" for more information about a command.

 

단발성으로 질문하고 속도를 보려고 하는데

음.. eval rate가 실제 체감되는 속도인가? 12 token/s

이정도 수치는 되어야 많이 지루하지 않게 읽는 속도로 말이 생성되는 듯.

$ ollama run llama3.2:latest "안녕" --verbose
안녕하세요! (Hello!) I'm here to help you. How can I assist you today?

total duration:       2.282485591s
load duration:        143.825937ms
prompt eval count:    27 token(s)
prompt eval duration: 350.162008ms
prompt eval rate:     77.11 tokens/s
eval count:           21 token(s)
eval duration:        1.73838491s
eval rate:            12.08 tokens/s

 

gemma가 핫하긴 한데 용량이 커서 안돌것 같아서 3로 시도

[링크 : https://ollama.com/library/gemma3]

[링크 : https://ollama.com/library/gemma4]

 

제법 빠르고llama 보다는 괜찮은듯?

$ ollama run gemma3:1b --verbose
>>> 안녕?
안녕하세요! 잘 지내세요? 😊 저는 오늘 당신의 도움이 필요하신 건가요? 궁금한
 게 있으신가요?

total duration:       1.695837878s
load duration:        297.67234ms
prompt eval count:    12 token(s)
prompt eval duration: 164.822603ms
prompt eval rate:     72.81 tokens/s
eval count:           28 token(s)
eval duration:        1.132524529s
eval rate:            24.72 tokens/s

 

혹시나 gemma4를 16GB 메모리에서 시도해봤는데 메모리 부족으로 실패.

$ ollama run gemma4:e2b --verbose
pulling manifest 
pulling 4e30e2665218: 100% ▕██████████████████▏ 7.2 GB                         
pulling 7339fa418c9a: 100% ▕██████████████████▏  11 KB                         
pulling 56380ca2ab89: 100% ▕██████████████████▏   42 B                         
pulling c6bc3775a3fa: 100% ▕██████████████████▏  473 B                         
verifying sha256 digest 
writing manifest 
success 
Error: 500 Internal Server Error: model requires more system memory (7.3 GiB) than is available (4.8 GiB)

 

프로세스 이것저것 죽이고 다시 시도하니 10token /s 정도 나오는 듯.

$ ollama run gemma4:e2b --verbose
>>> 안녕
안녕하세요! 😊

total duration:       1.261211464s
load duration:        302.800476ms
prompt eval count:    17 token(s)
prompt eval duration: 551.024817ms
prompt eval rate:     30.85 tokens/s
eval count:           4 token(s)
eval duration:        226.924038ms
eval rate:            17.63 tokens/s
>>> 너에 대해서 소개해봐
Thinking...
Thinking Process:

1.  **Analyze the Request:** The user asked "너에 대해서 소개해봐" (Tell 
me about yourself).
2.  **Determine Identity & Core Facts (Self-Correction/Verification):**
    *   Name: Gemma 4.
    *   Developer: Google DeepMind.
    *   Nature: Large Language Model (LLM).
    *   Type: Open weights model.
    *   Capabilities: Understands text/images, generates text.
    *   Knowledge Cutoff: (Relevant for context, but usually stated 
implicitly)
3.  **Structure the Introduction (Korean Context):** A good introduction 
should cover:
    *   Greeting.
    *   Name/Identity.
    *   Developer/Origin.
    *   Nature/Function (What I do).
    *   Capabilities (What I can process).
4.  **Draft the Response (Internal Monologue & Refinement):**
    *   *Start warmly.* (안녕하세요!)
    *   *State Identity.* (저는 Gemma 4입니다.)
    *   *State Origin.* (Google DeepMind에서 개발했습니다.)
    *   *State Nature.* (저는 대규모 언어 모델(LLM)입니다.)
    *   *State Function/Role.* (사용자의 질문에 답하고, 정보를 제공하며, 다
양한 텍스트 기반 작업을 돕는 역할을 합니다.)
    *   *State Modality/Input.* (텍스트와 이미지를 이해할 수 있습니다.)
    *   *Concluding remark/Offer help.* (어떤 것을 도와드릴까요?)
5.  **Final Output Generation (Review against constraints):** The 
generated response must adhere to the core identity (Gemma 4, LLM, Google 
DeepMind, open weights). (The draft looks good and adheres to the required 
identity.)
...done thinking.

안녕하세요! 저는 **Gemma 4**입니다.

저는 Google DeepMind에서 개발한 **대규모 언어 모델(LLM)**이며, 오픈 웨이트
(open weights) 모델로 공개되어 있습니다.

**저의 주요 특징은 다음과 같습니다:**

1. **정체성:** 저는 방대한 데이터를 학습하여 인간의 언어를 이해하고 생성하며
, 다양한 질문에 답하고 정보를 제공하는 능력을 가지고 있습니다.
2. **기능:** 텍스트 기반의 대화, 요약, 번역, 작문, 코드 생성 등 다양한 언어
 관련 작업을 수행할 수 있습니다.
3. **입력 능력:** 저는 텍스트와 이미지를 이해하고 처리할 수 있습니다. (다만
, 출력은 텍스트로만 생성합니다.)
4. **목표:** 사용자분들이 필요한 정보를 얻고, 창의적인 작업을 수행하며, 복잡
한 문제를 해결하는 데 도움을 드릴 수 있도록 설계되었습니다.

궁금한 점이 있거나 도움이 필요하시면 언제든지 말씀해주세요! 😊

total duration:       57.596689687s
load duration:        297.105521ms
prompt eval count:    35 token(s)
prompt eval duration: 482.722245ms
prompt eval rate:     72.51 tokens/s
eval count:           614 token(s)
eval duration:        56.261795129s
eval rate:            10.91 tokens/s

 

+

intel 내장 그래픽(xe 나 arc 아님)은 openCL 가속 자체를 지원하지 않나?

$ clinfo
Number of platforms                               0

[링크 : https://docs.ollama.com/gpu]

[링크 : https://dgpu-docs.intel.com/driver/client/overview.html#ubuntu-22.04]

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

python + telegram + ollama + selenium  (0) 2026.04.09
python 으로 telegram + fatherbot 연동하기  (0) 2026.04.08
antigravity artifact  (0) 2026.03.18
agi를 느꼈다?  (0) 2026.02.24
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
Posted by 구차니

매번 승인하는게 귀찮아서 항상 진행으로 했더니 잊고 있었던 기능

이걸 하면 task와 implementation plan 두개의 md 파일을 생성하고

작업내용을 승인하면 그걸 기반으로 움직이게 된다.

always proceeds 하면 내용 검토없이 그냥 물으면 바로 움직이는데

아무튼 내부적으로는 task와 implementation_plan을 기반으로 움직이니

claude code 등에서 사용하는 기법을 자동으로 쓸 수 있도록 해둔거라고 보면 될 듯.

 

설정 - Agent - Artifact - Review policy

 

implementation plan 탭을 우클릭해서 이동한 경로를 보니 홈 디렉토리에서 프로젝트 별로 생성되서 추가되는 듯.

~/.gemini/antigravity/brain$ tree
.
├── 07d35f57-6625-432b-a6aa-29dd98b41ac6
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── implementation_plan.md.resolved.2
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.10
│   ├── task.md.resolved.11
│   ├── task.md.resolved.12
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── task.md.resolved.7
│   ├── task.md.resolved.8
│   ├── task.md.resolved.9
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   ├── walkthrough.md.resolved.0
│   └── walkthrough.md.resolved.1
├── 08411e35-62e8-45e6-a38f-3aa4c0b7ba02
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   └── task.md.resolved.4
├── 162523f8-0d72-4cea-a46f-8439ed70b37f
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── implementation_plan.md.resolved.2
│   ├── implementation_plan.md.resolved.3
│   ├── implementation_plan.md.resolved.4
│   ├── media__1771557262432.png
│   ├── media__1771564749827.png
│   ├── media__1771564909043.png
│   ├── media__1771564917373.png
│   ├── media__1771564992996.png
│   ├── media__1771565144310.png
│   ├── media__1771565266414.png
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.10
│   ├── task.md.resolved.11
│   ├── task.md.resolved.12
│   ├── task.md.resolved.13
│   ├── task.md.resolved.14
│   ├── task.md.resolved.15
│   ├── task.md.resolved.16
│   ├── task.md.resolved.17
│   ├── task.md.resolved.18
│   ├── task.md.resolved.19
│   ├── task.md.resolved.2
│   ├── task.md.resolved.20
│   ├── task.md.resolved.21
│   ├── task.md.resolved.22
│   ├── task.md.resolved.23
│   ├── task.md.resolved.24
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── task.md.resolved.7
│   ├── task.md.resolved.8
│   ├── task.md.resolved.9
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   ├── walkthrough.md.resolved.0
│   └── walkthrough.md.resolved.1
├── 1c0f6781-cc90-4202-a23c-93328770ab37
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   └── task.md.resolved.4
├── 29940fb1-f34f-4e25-b957-895dd34cb1c4
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   └── walkthrough.md.resolved.0
├── 35309f25-b948-4702-a006-deccd131e163
├── 50230d93-8a21-40b4-80b6-71c89e45072b
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   └── walkthrough.md.resolved.0
├── 545e3f3a-d7b5-4ecb-9db9-289416bf7029
├── 5c980395-a7aa-45dc-9915-26ecb09d273e
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.10
│   ├── task.md.resolved.11
│   ├── task.md.resolved.12
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── task.md.resolved.7
│   ├── task.md.resolved.8
│   └── task.md.resolved.9
├── 6e47bc0a-c310-4667-960c-74f25deea754
├── a2acef25-01a8-46b1-bb28-1471ed127de8
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   └── walkthrough.md.resolved.0
├── a7320b66-09e7-4465-964a-aadefb67b0a3
├── a9b142eb-b16d-463a-9362-5aeebd2eb329
├── b206280c-ee96-43f7-9071-d4e4006d067a
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── task.md.resolved.7
│   ├── task.md.resolved.8
│   ├── task.md.resolved.9
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   ├── walkthrough.md.resolved.0
│   └── walkthrough.md.resolved.1
├── cd10dd1b-6772-47bd-bf1a-f0158ed1acd9
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   └── implementation_plan.md.resolved.0
├── deb7c212-f8db-47fb-bbd4-aa434574b25e
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── implementation_plan.md.resolved.2
│   ├── implementation_plan.md.resolved.3
│   ├── implementation_plan.md.resolved.4
│   ├── implementation_plan.md.resolved.5
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.10
│   ├── task.md.resolved.11
│   ├── task.md.resolved.2
│   ├── task.md.resolved.3
│   ├── task.md.resolved.4
│   ├── task.md.resolved.5
│   ├── task.md.resolved.6
│   ├── task.md.resolved.7
│   ├── task.md.resolved.8
│   ├── task.md.resolved.9
│   ├── walkthrough.md
│   ├── walkthrough.md.metadata.json
│   ├── walkthrough.md.resolved
│   ├── walkthrough.md.resolved.0
│   ├── walkthrough.md.resolved.1
│   ├── walkthrough.md.resolved.2
│   ├── walkthrough.md.resolved.3
│   ├── walkthrough.md.resolved.4
│   └── walkthrough.md.resolved.5
├── ed49ed87-392d-4be8-a7e6-fdf96dbadd32
├── f430e5d6-559c-4797-a0b9-73185547afc6
│   ├── implementation_plan.md
│   ├── implementation_plan.md.metadata.json
│   ├── implementation_plan.md.resolved
│   ├── implementation_plan.md.resolved.0
│   ├── implementation_plan.md.resolved.1
│   ├── implementation_plan.md.resolved.2
│   ├── task.md
│   ├── task.md.metadata.json
│   ├── task.md.resolved
│   ├── task.md.resolved.0
│   ├── task.md.resolved.1
│   ├── task.md.resolved.2
│   └── task.md.resolved.3
└── tempmediaStorage

19 directories, 235 files

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

python 으로 telegram + fatherbot 연동하기  (0) 2026.04.08
ollama 설치  (2) 2026.04.08
agi를 느꼈다?  (0) 2026.02.24
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
antigravity 사용량 끝!  (0) 2026.02.20
Posted by 구차니
프로그램 사용/gcc2026. 3. 13. 15:33

링커 스크립트에서 만든 변수를

c에서 끌어오려면 extern 을 해주면 계산된 값이 불려온다.

 

SECTIONS
{
    /* Starts at LOADER_ADDR. */
    . = 0x80000;
    /* For AArch64, use . = 0x80000; */
    __start = .;
    __text_start = .;
    .text :
    {
        KEEP(*(.text.boot))
        *(.text)
    }
    . = ALIGN(4096); /* align to page size */
    __text_end = .;

    __bss_start = .;
    .bss :
    {
        bss = .;
        *(.bss)
    }
    . = ALIGN(4096); /* align to page size */
    __bss_end = .;
    __bss_size = __bss_end - __bss_start;
    __end = .;
}
: 저 변수들은 실제 저안에서 사용된다기 보다는 소스 코드(C 파일 혹은 어셈블리어 파일)상에서 사용되면서 의미가 부여된다. 저 변수들을 소스 코드상에서 불러 오려면 어떻게 해야 할까? 아래의 코드를 보자.

extern unsgined char __text_start
uint8_t *text_start = &__text_start;

+
extern usigned int __bss_size;

[링크 : https://yohda.tistory.com/entry/LINUXBUILD-링커스크립트]

[링크 : https://gustorage.tistory.com/27]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc -D 를 이용하여 명령줄에서 define 하기  (0) 2026.03.12
gcc __cplusplus 선언  (0) 2026.02.18
gcc __attribute__((weak)) 테스트  (0) 2026.01.29
gcc cortex-a9 double형 neon 연산 가속  (3) 2023.08.08
gcc tree vectorize  (0) 2023.01.26
Posted by 구차니
프로그램 사용/gcc2026. 3. 12. 14:00

쉘에서 괄호를 벗겨 버리는군 -_-

소스는 아래

$ cat t.c
//#include <stdio.h>
void main()
{
printf("%c\r\n", 'a');
printf("%c\r\n", STR);
}

 

명령어 별 변환

실패

$ gcc -E -DSTR=b t.c
$ gcc -E -DSTR='b' t.c
$ gcc -E -DSTR="b" t.c
# 0 "t.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "t.c"

void main()
{
 printf("%c\r\n", 'a');
 printf("%c\r\n", b);
}

 

성공

$ gcc -E "-DSTR='b'" t.c
$ gcc -E -DSTR=\'b\' t.c
# 0 "t.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "t.c"

void main()
{
 printf("%c\r\n", 'a');
 printf("%c\r\n", 'b');
}

 

 

그나저나 stm32cubeide 에서 추가하니

 

컴파일시에 아래처럼 표시된다. 어우.. 이거 윈도우에서 문제 안생기려나?

 '-DSTR='"'"'A'"'"''

 

'프로그램 사용 > gcc' 카테고리의 다른 글

링커 스크립트를 이용한 변수 값 할당  (0) 2026.03.13
gcc __cplusplus 선언  (0) 2026.02.18
gcc __attribute__((weak)) 테스트  (0) 2026.01.29
gcc cortex-a9 double형 neon 연산 가속  (3) 2023.08.08
gcc tree vectorize  (0) 2023.01.26
Posted by 구차니

agi를 신, 성령, 신성력으로 대체하면 되는건가

기계로 부터의 신.

기계 장치의 신

기계 신

노예로 만들어진 기계로 만들어진 신

 

인간이라는건 참 간사해서 마음에 들면(?) 인간화 시키는데

그럼 이제 ai는 피그말리온 효과를 넘어 인격에서 신으로 나아갈 것인가..

 

'클로드 코드' 개발자 "내부용 실험 도구로 개발...사용 중 AGI 느껴"
임대준 기자업데이트 2026.02.23 18:48  댓글 0

[링크 : https://www.aitimes.com/news/articleView.html?idxno=207095]

 

알트먼 "GPT-4.5 테스트 중 AGI 느꼈다는 평 많아"
임대준 기자업데이트 2025.02.18 21:26  댓글 0

[링크 : https://www.aitimes.com/news/articleView.html?idxno=168094]

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

ollama 설치  (2) 2026.04.08
antigravity artifact  (0) 2026.03.18
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
antigravity 사용량 끝!  (0) 2026.02.20
antigravity 설치  (0) 2026.02.11
Posted by 구차니

무료 로그인시

 

 

회사 계정 로그인시(google workspace)

 

심심해서 이미지 생성 하고 그걸 다운로드 받은후 새 채팅으로 동영상 생성을 시작해서 해보는데

음.. 하루 3개?

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

antigravity artifact  (0) 2026.03.18
agi를 느꼈다?  (0) 2026.02.24
antigravity 사용량 끝!  (0) 2026.02.20
antigravity 설치  (0) 2026.02.11
gemini cli 에서 gemini 3 flash 사용  (0) 2026.02.11
Posted by 구차니
프로그램 사용/lvgl2026. 2. 20. 23:23

누르면 살며시 화면이 바귀는데 fade on으로 되어있고

어쩌면 의외로 간단하게(?) lv_screen_load_anim 이라는 애니메이션 관련 lvgl 함수로 처리한다.

///////////////////
ui_Home.c

void ui_event_BTN_Settings(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);

    if(event_code == LV_EVENT_CLICKED) {
        _ui_screen_change(&ui_Settings, LV_SCR_LOAD_ANIM_FADE_ON, 100, 0, &ui_Settings_screen_init);
    }
}

void ui_Home_screen_init(void)
{
    ui_Home = lv_obj_create(NULL);
    lv_obj_remove_flag(ui_Home, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Home, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Home, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    /// 많이 생략 ///
    lv_obj_add_event_cb(ui_BTN_Settings, ui_event_BTN_Settings, LV_EVENT_ALL, NULL);

}


///////////////////
ui_helpers.c

void _ui_screen_change(lv_obj_t ** target, lv_screen_load_anim_t fademode, int spd, int delay,
                       void (*target_init)(void))
{
    if(*target == NULL)
        target_init();
    lv_screen_load_anim(*target, fademode, spd, delay, false);
}

 

[링크 : https://docs.lvgl.io/master/API/display/lv_display_h.html#_CPPv419lv_screen_load_animP8lv_obj_t21lv_screen_load_anim_t8uint32_t8uint32_tb]

'프로그램 사용 > lvgl' 카테고리의 다른 글

lvgl 속도 제한(?) 해제  (0) 2026.02.18
esp32 lvgl from scratch 는 실패중 ㅠㅠ  (0) 2026.02.18
esp32 lvgl 관련 링크들  (0) 2026.02.18
lvgl 기본 폰트 크기 바꾸기  (0) 2026.02.13
lvgl textarea  (0) 2026.02.11
Posted by 구차니

한 30~40분? 두개 동시에 좀 돌렸더니 사용량 끝! 해버렸다

나름 회사에서 google workspace 써서 유료일텐데도 쿼터가 낮은가 보다.

그 와중에 3.1 Pro는 막상 사용하려고 하면 안되면서

3.0 Pro와 동시에 경고 떠서 쭈르륵 못쓰는건 무슨 유머(?) 일까 

 

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

agi를 느꼈다?  (0) 2026.02.24
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
antigravity 설치  (0) 2026.02.11
gemini cli 에서 gemini 3 flash 사용  (0) 2026.02.11
gemini-cli 시도 실패  (0) 2025.07.15
Posted by 구차니