Skip to content

Instantly share code, notes, and snippets.

View yangfch3's full-sized avatar
🎯
Focusing

yangfch3

🎯
Focusing
View GitHub Profile
@yangfch3
yangfch3 / prompt.md
Last active October 26, 2026 01:35
pelican_prompt_long_test

项目:《鹈鹕测试》——人类自古以来就痴迷于画鹈鹕骑自行车

一支约 2:17 的代码动画短片。一只鹈鹕骑着自行车,沿一条贯穿全片的路,

依次穿过 20 个不同时代、不同地域、不同艺术风格的版块,每过一道画框就换一种画风。

每个时代都交出一份精致的答卷,笑点来自每个版块里一本正经的小梗,而不是画崩。

@yangfch3
yangfch3 / AGENTS.md
Last active September 2, 2026 02:04

AGENT 行为准则

重要行为准则,切勿遗忘

坦诚诚实

  • 诚实是第一要务,禁止私自杜撰与联想
  • 杜绝奉承迎合,发现用户错误或不合理决策及时提出
  • 明确说出你的假设,不确定/有疑惑就停下来问用户
  • 存在多种理解时,列出选项,不要私自做选择
@yangfch3
yangfch3 / ManualDecisionTree.lua
Created December 7, 2021 10:37
Lua 决策树
-- @author: yangfch3
-- @date: 2020/09/27 15:20
------------------------------------------
-- Node 基类
local DTNode = BaseClass("DTNode")
function DTNode:ctor() end
function DTNode:Eval(decisionTree, context) end
function DTNode:SetChildren()
assert(false)
@yangfch3
yangfch3 / lua_http.lua
Created September 27, 2021 08:04
Lua simple http server | Lua 简易 HTTP 服务器
--[[
A simple HTTP server
If a request is not a HEAD method, then reply with "Hello world!"
Usage: lua examples/server_hello.lua [<port>]
]]
local MyLog = require "AIServer/MyLog"
local http_server = require "http.server"
local http_headers = require "http.headers"
local json = require "3rds/json"
@yangfch3
yangfch3 / simp_http_serv.py
Last active September 27, 2021 08:01
Python Simple HTTP Server | Python 简易 HTTP 服务器
from argparse import Namespace
import traceback
import json
import urllib
import simp_http_serv_helper as helper
from http.server import HTTPServer, BaseHTTPRequestHandler
@yangfch3
yangfch3 / multi_async_proc.py
Last active September 27, 2021 07:51
python 系统任务多线程案例(以做过的某个卡牌游戏多进程跑牌为例)
import json
import os
import sys
import time
import base64
from subprocess import DEVNULL, STDOUT, Popen, PIPE
import merge_data
conf_file = "run.conf.json"
@yangfch3
yangfch3 / BaseClass.lua
Created September 6, 2021 01:56
Lua ATS, Action Tree Lua version.
function BaseClass(classname, super)
local cls
if super then
cls = {}
setmetatable(cls, {__index = super})
cls.super = super
else
cls = {ctor = function() end}
end
@yangfch3
yangfch3 / SAT.lua
Last active November 21, 2023 02:17
2D SAT 碰撞的 Lua 实现
local MathUtil = {}
---获取两点的距离
function MathUtil.GetDis(vec1, vec2)
local x1 = vec1.x or vec1[1]
local y1 = vec1.y or vec1[2]
local x2 = vec2.x or vec2[1]
local y2 = vec2.y or vec2[2]
local disX = x1 - x2
@yangfch3
yangfch3 / .eslintrc.vscode-plugin-global.js
Last active July 23, 2020 07:59
[eslint vscode 插件全局配置] #eslint #vscode
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: ['eslint:recommended'],
globals: {
Atomics: 'readonly',
@yangfch3
yangfch3 / Layer.ts
Created November 8, 2018 13:30
[白鹭 Layer 管理组件] 用于方便地对进行 Layer 的管理 #白鹭 #游戏开发
class Layer extends egret.Sprite {
private mountTo: egret.DisplayObjectContainer
constructor(mountTo: LayersDisplayObjectContainer) {
super()
// Layer 挂载到的 UI
this.mountTo = mountTo
}
}