Skip to content

Instantly share code, notes, and snippets.

View ras0q's full-sized avatar
🦝

Kira Kawai ras0q

🦝
View GitHub Profile
@ras0q
ras0q / AGENTS.md
Last active August 16, 2025 08:14
A base Instruction for coding agents
applyTo
**

YOU MUST READ THE README.md FILE FIRST!

  • After checking README.md, MUST output "README checked!!".
  • For third-party libraries with a known GitHub URL, actively use DeepWiki MCP to reference usage instructions.
  • If you need documentation for a library, first check with Context7 MCP to see if the relevant documentation is available.
import sys
import zipfile
import xml.etree.ElementTree as ET
from pprint import pprint
# プレースホルダーの位置を取得する関数
def get_placeholder_positions(xml_content):
positions = []
tree = ET.ElementTree(ET.fromstring(xml_content))
@ras0q
ras0q / ViewController.swift
Last active August 10, 2024 15:39
UIKitにPencilKitを組み込む最小構成
import PencilKit
import UIKit
class ViewController: UIViewController {
private lazy var canvasView = PKCanvasView(frame: view.frame)
private lazy var toolPicker = PKToolPicker()
override func viewDidLoad() {
super.viewDidLoad()
@ras0q
ras0q / print_arg_expression.go
Created February 24, 2024 00:14
assert(a<b)を渡した時にassertの内側からa<bを文字列として出力する
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
"runtime"
[tool.black]
line_length = 88
[tool.mypy]
strict = true
ignore_missing_imports = true
[tool.ruff]
select = [
# INFO: Run this command on graphdeco-inria/gaussian-splatting project root
# check commands
Get-Command "conda" || { Write-Error "conda is required" && Exit }
Get-Command "ninja" || { Write-Error "ninja is required" && Exit }
# setup CUDA 11.8
(nvcc -V | Select-String -Pattern "11.8") || { Write-Error "CUDA 11.8 is required" && Exit }
$env:CUDA_HOME = (Get-Command nvcc).Path | Split-Path -Parent | Split-Path -Parent
@ras0q
ras0q / pages.yml
Last active October 25, 2022 08:53
marp形式でスライド書いてGithub PagesにデプロイするGithub Actions
name: pages
on:
push:
branches:
- 'main'
paths:
- 'docs/**'
- '.github/workflows/pages.yml'
pull_request:
@ras0q
ras0q / docker-install.sh
Last active October 5, 2023 13:21
install docker to ubuntu
bash -c '
sudo apt-get update -y;
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg;
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
@ras0q
ras0q / gitmojis.json
Last active November 13, 2022 05:46
gitmoji-template - template for https://github.com/carloscuesta/gitmoji-cli
{
"gitmojis": [
{
"emoji": "✨",
"name": "sparkles",
"code": ":sparkles:",
"description": "Introduce new features."
},
{
"emoji": "⚡️",