Skip to content

Instantly share code, notes, and snippets.

@minpeter
minpeter / wandb registry-model upload
Created June 10, 2025 03:16
Simple example code to add an artifact to wandb and link it with the model registry.
from pathlib import Path
import wandb
run = wandb.init(project="axolotl")
model_path = Path("/data/minpeter/github.com/minpeter/mirco-ko-llama/outputs/tiny-ko-sft/checkpoint-5600")
# 아티팩트로 로그
logged_artifact = run.log_artifact(
model_path,
@minpeter
minpeter / fse_mcp.py
Last active April 7, 2025 14:27
MCP + FSE
import asyncio
import json
import os
from typing import Optional
from contextlib import AsyncExitStack
from mcp import ClientSession
from mcp.client.sse import sse_client
from openai import OpenAI
@minpeter
minpeter / client-only-ai-sdk-page.tsx
Created November 1, 2024 03:40
This is code that allows you to use Vercel AI SDK only with client components.
"use client";
import { useChat } from "ai/react";
import { createFriendliAI } from "@friendliai/ai-provider";
import { convertToCoreMessages, streamText } from "ai";
import { useState } from "react";
export default function Chat() {
const [token, setToken] = useState<string>("");
@minpeter
minpeter / global.css
Last active September 26, 2024 04:58
reactmarkdown + tailwindcss + sugar-high + math
@layer base {
:root {
/* Sugar-high theme */
--sh-class: #4d9ef6;
/* Brighter blue for class */
--sh-identifier: #6caedd;
/* Lighter blue for identifiers */
--sh-sign: #cdd3de;
/* Lighter gray to ensure signs are visible */
@minpeter
minpeter / gh-image-bp.yml
Last active March 13, 2024 04:54
깃허브 패키지 레지스터에 matrix를 이용해 arm64, amd64 공용 이미지를 빌드하고 푸시함
name: BUILD and PUSH to GHR
on:
workflow_dispatch:
push:
branches: ["main"]
env:
REGISTRY: ghcr.io
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}
@minpeter
minpeter / blur-lisum.html
Created February 19, 2024 03:03
vercel style dark blur box test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lipsum</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
@minpeter
minpeter / minpeter's GitHub Stats
Last active August 23, 2024 12:18
Github Stats ✨
⭐ Total Stars: 34
➕ Total Commits: 1,999
🔀 Total PRs: 76
🚩 Total Issues: 66
📦 Contributed to: 34
🌞 Morning 205 commits █████▌░░░░░░░░░░░░░░░ 26.2%
🌆 Daytime 345 commits █████████▎░░░░░░░░░░░ 44.1%
🌃 Evening 156 commits ████▏░░░░░░░░░░░░░░░░ 19.9%
🌙 Night 76 commits ██░░░░░░░░░░░░░░░░░░░ 9.7%
🗣 Commented on #2 in GGos3/blog
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop bucket add extras
scoop install runcat