版本: v1.0
适用对象: OpenCode CLI 用户
目标: 构建具备自我反思、自我修正、自我扩展能力的智能Agent系统
预计周期: 8-12周(可根据实际情况调整)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================================================= | |
| # Variables | |
| # ============================================================================= | |
| # Application name | |
| APP := jop | |
| # Package paths | |
| MAIN_DIR := cmd/jop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "context" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Set values | |
| # Hide welcome message & ensure we are reporting fish as shell | |
| set fish_greeting | |
| set VIRTUAL_ENV_DISABLE_PROMPT 1 | |
| set -xU MANPAGER "sh -c 'col -bx | bat -l man -p'" | |
| set -xU MANROFFOPT -c | |
| set -x SHELL /usr/bin/fish | |
| ## Export variable need for qt-theme | |
| if type qtile >>/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf8 -*- | |
| import atexit | |
| import os | |
| import sys | |
| import time | |
| from signal import SIGINT, SIGTERM | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 代码用Go语言的反射示范了把YAML文件里面的字段抽取之后拼接打到控制台的实现方法 | |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # 原项目地址:https://github.com/michaeljclark/musl-riscv-toolchain | |
| # | |
| # ## musl-toolchain | |
| # | |
| # musl-libc GCC cross compiler toolchain bootstrap script | |
| # | |
| # Usage: ./musl-toolchain <arch> [gcc version] [linux version] [fast|all] | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from Crypto.Util.number import GCD, bytes_to_long, long_to_bytes | |
| class CRT: | |
| def __init__(self, p, q): | |
| self.p_p_inv = p * pow(p,-1,q) | |
| self.p_q = p * q | |
| def calc(self, a, b): | |
| x = a + (b - a) * self.p_p_inv | |
| return x % self.p_q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script builds a (hopefully) working gcc based cross compiler | |
| # Update to latest stable release | |
| BINUTILS_VERSION=2.27 | |
| GMP_VERSION=6.1.2 | |
| MPFR_VERSION=3.1.5 | |
| MPC_VERSION=1.0.3 | |
| ISL_VERSION=0.16.1 | |
| GCC_VERSION=6.3.0 |
NewerOlder