WWW.YOUINFO.SITE
标签聚合 建立

/tag/建立

LinuxDo 最新话题 · 2026-06-08 13:22:20+08:00 · tech

分享一下我的ai写作成果初稿,上周五完工的,生成方式cherry studio +提示词+ rawchat佬的公益gpt5.5(目前不能用了,只能在codex中使用)。初稿没啥图片,佬友们凑合看看,欢迎大家提提意见呀~ “首席摄影师”提示词如下 (点击了解更多详细信息) 上传失败,我用蓝奏云链接分享吧 withnoidea.lanzouu.com 从零开始学摄影:8 节课建立你的拍摄基本功.pdf - 蓝奏云 文件大小:3.6 M 1 个帖子 - 1 位参与者 阅读完整话题

IT之家 · 2026-06-08 07:38:05+08:00 · tech

IT之家 6 月 8 日消息,英伟达与 SK 海力士今日宣布建立多年期技术合作伙伴关系,围绕全球 AI 工厂建设所需的 下一代内存展开联合研发 ,并将 AI 技术应用于半导体芯片设计与制造。 根据协议,SK 海力士将为英伟达 Vera Rubin AI 超级计算机、Vera CPU、RTX Spark PC 及 Jetson Thor 机器人计算平台协同开发专用内存,由此进入英伟达正在开拓的 AI 基础设施、个人 AI 及物理 AI 等新市场。 IT之家从公告获悉,该多年期协议支持供应以 满足高端内存延长开发周期 的需求。随着 AI 工厂在全球规模化,这一战略合作使内存供应能够跟上英伟达的基础设施路线图和全球 AI 基础设施的持续建设步伐。 在半导体制造领域,SK 海力士将采用英伟达 CUDA-X 库及 PhysicsNeMo 框架加速芯片仿真和光刻计算工作流;同时借助英伟达 Omniverse 和 cuOpt 构建晶圆厂数字孪生,推动工厂自主化运营。

LinuxDo 最新话题 · 2026-06-07 03:18:39+08:00 · tech

你的“快”被废了(效率没了) 你大脑里的 fast-path,是你自己反复踩坑、反复验证后建立的高质量模式识别。 被迫从“判断模式”切换到“表演模式”——表演一个“AI辅助开发”的过程,给流程看。 你的“慢”也被废了(质量没了) 面对未知问题,真正的慢是有方向的慢:探索、比较、推敲、验证,最后形成判断。这个过程需要空间,需要反复,需要试错。 但领导在未知领域强行“快进”——自己用指令生成、自己质疑、自己推翻、自己纠偏。这条链路上,你被踢出了“思考者”的位置,变成了“执行助手”。你负责搭台、拆台、再搭台,但戏剧的台词、节奏、结局全由一个人定。 旧时代,领导不懂技术,你还能用专业争取话语权。 新时代,领导用 AI 直接生成代码,你的专业不再是他依赖的唯一路径。但他不知道,他的生成里少了什么。 3 个帖子 - 3 位参与者 阅读完整话题

LinuxDo 最新话题 · 2026-06-05 04:09:54+08:00 · tech

关于使用Cloudflare双域名+Cloudflare for SaaS加速网站方案的一点疑惑 假设有如下两个域名: (主域名) main-domain.com (辅助域名): domain.com 原本的流程是: domain.com 这边的配置 DNS: cdn.domain.com 配置 CNAME 到 cloudflare.182682.xyz (小黄云:灰) origin.domain.com 配置到需要加速的的 IP,例如: 123.4.5.6 (小黄云:开) Cloudflare for SaaS 中添加 回退源: origin.domain.com 自定义主机名 www.main-domain.com (配置源服务器为默认或者 origin.domain.com ) main-domain.com 这边的配置 DNS: www.main-domain.com 配置 CNAME 到 cdn.domain.com 这样配置的话访问 https://www.main-domain.com 时流量就是: ​ CNAME CNAME 解析到 Anycast IP Host 为 www. main-domain.com 匹配成功,获取回源地址 用户访问: www. main-domain.com cdn.domain.com cloudflare.182682.xyz 进入 Cloudflare 内部网络 解析 HTTP Host 头 查找 SaaS 自定义主机名配置 回源 源服务器 origin.domain.com IP: 123.4.5.6 按照大佬的思路做双域名加速cdn(感谢) 试了一些 被维护的加速ip池 cf.090227.xyz cf-cname.xingpingcn.top 依旧本地并且多地不能访问 连接失败并且 访问被加速的域名 和 大佬维护的池子域名 速度差别也很大 请问有遇到同类情况的佬吗?现在是这个方案还能用吗 有没有成功的佬 7 个帖子 - 4 位参与者 阅读完整话题

LinuxDo 最新话题 · 2026-06-04 15:19:12+08:00 · tech

如何使用Agent辅助教研,写论文、做课题,请有经验的佬们支招。 我的想法是,在项目文件夹下面,建立三个子文件夹: 我的资料(放和该论文或课题相关的资料) 参考资料(放网络上搜索到的和本论文或课题相关的政策、规范、报告等等资料) 论文要求(放该论文相关写作和格式等要求) 然后再分三大阶段,九小步来形成初稿: 第一阶段:备料 确认论文要求 盘点材料 提炼可用内容(问题,做法,案例,数据) 补充参考材料(最新政策+相关文献) 第二阶段:定题定调 5. 出10个选题(能不能写,用啥材料支撑) 6. 定研究思路 第三阶段:成文 7. 搭框架 8. 分章节写初稿(符合论文要求,参考优秀论文写法) 9. 全文核查(逐条核验引用,疑似编造直接删除) 3 个帖子 - 2 位参与者 阅读完整话题

LinuxDo 最新话题 · 2026-05-30 10:41:08+08:00 · tech

codex建立新会话之后,直接发送类似 codex-session-dialog xxxx-xxx-xxxx --last 10 就会获取指定session倒数10个的会话内容 #!/usr/bin/env python3 from __future__ import annotations import argparse import json import sqlite3 import sys from datetime import datetime, timezone from dataclasses import dataclass from pathlib import Path from typing import Iterable @dataclass class DialogMessage: role: str text: str @dataclass class SessionData: session_id: str | None messages: list[DialogMessage] cwd: str | None = None @dataclass class SessionMatch: file_path: Path session_id: str | None cwd: str | None sort_key: int | None = None title: str | None = None def build_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( description='Extract a cleaned dialog transcript for a Codex session.' ) parser.add_argument('target', help='Session id/prefix, a jsonl file, or a workspace directory') parser.add_argument( '--codex-home', default=str(Path.home() / '.codex'), help='Codex home directory (default: ~/.codex)', ) parser.add_argument( '--include-environment', action='store_true', help='Keep <environment_context> user messages', ) parser.add_argument( '--last', type=int, default=None, help='Only output the most recent N dialog blocks, split by each user message.', ) parser.add_argument( '--list', action='store_true', help='List matching Codex sessions and their inferred titles for the given workspace path.', ) parser.add_argument( '--show-path', action='store_true', help='Show rollout jsonl path in list output.', ) return parser def normalize_text(text: str) -> str: lines = [line.rstrip() for line in text.replace('\r\n', '\n').replace('\r', '\n').split('\n')] compact = '\n'.join(lines).strip() while '\n\n\n' in compact: compact = compact.replace('\n\n\n', '\n\n') return compact def normalize_path_string(path_str: str) -> str: return str(Path(path_str).expanduser().resolve(strict=False)) def read_session_meta(path: Path) -> tuple[str | None, str | None]: try: with path.open(encoding='utf-8') as fh: first_line = fh.readline() payload = json.loads(first_line).get('payload') or {} except Exception: # noqa: BLE001 return None, None session_id = payload.get('id') cwd = payload.get('cwd') if not isinstance(session_id, str) or not session_id: session_id = None if not isinstance(cwd, str) or not cwd: cwd = None return session_id, cwd def iter_rollout_files(codex_home: Path) -> list[Path]: sessions_root = codex_home / 'sessions' if not sessions_root.exists(): raise FileNotFoundError(f'sessions directory not found: {sessions_root}') return sorted(sessions_root.rglob('rollout-*.jsonl')) def _find_session_file_by_id(session: str, codex_home: Path) -> Path: exact_matches: list[Path] = [] prefix_matches: list[Path] = [] for path in iter_rollout_files(codex_home): sid, _ = read_session_meta(path) if not sid: continue if sid == session: exact_matches.append(path) elif sid.startswith(session): prefix_matches.append(path) if len(exact_matches) == 1: return exact_matches[0] if len(exact_matches) > 1: raise ValueError(f'multiple exact matches found for session {session}') if len(prefix_matches) == 1: return prefix_matches[0] if not prefix_matches: raise FileNotFoundError(f'no session file found for {session}') raise ValueError(f'multiple prefix matches found for {session}') def find_sessions_by_workspace(workspace: Path, codex_home: Path) -> list[SessionMatch]: workspace_key = normalize_path_string(str(workspace)) matches: list[SessionMatch] = [] for path in iter_rollout_files(codex_home): session_id, cwd = read_session_meta(path) if not cwd: continue if normalize_path_string(cwd) == workspace_key: matches.append(SessionMatch(file_path=path, session_id=session_id, cwd=cwd)) if not matches: raise FileNotFoundError(f'no Codex sessions found for workspace {workspace}') for match in matches: match.sort_key = read_thread_sort_key(codex_home, match) matches.sort( key=lambda item: ( item.sort_key if item.sort_key is not None else int(item.file_path.stat().st_mtime * 1000), str(item.file_path), ) ) return matches def resolve_target(target: str, codex_home: Path) -> Path: candidate = Path(target).expanduser() if candidate.is_file(): if candidate.suffix.lower() != '.jsonl': raise ValueError(f'not a jsonl file: {candidate}') return candidate if candidate.is_dir(): matches = find_sessions_by_workspace(candidate, codex_home) non_empty: list[SessionMatch] = [] for match in matches: session_data = load_session_messages(match.file_path) if not is_effectively_empty_thread(codex_home, match, session_data): non_empty.append(match) if not non_empty: raise FileNotFoundError(f'no non-empty Codex sessions found for workspace {candidate}') return non_empty[-1].file_path return _find_session_file_by_id(target, codex_home) def extract_text_parts(content_items: Iterable[dict]) -> str: parts: list[str] = [] for item in content_items: if not isinstance(item, dict): continue text = item.get('text') if isinstance(text, str) and text.strip(): parts.append(text) continue output = item.get('output') if isinstance(output, str) and output.strip(): parts.append(output) return normalize_text('\n\n'.join(parts)) def should_skip(role: str, text: str, include_environment: bool) -> bool: if role not in {'user', 'assistant'}: return True if not text: return True if not include_environment and text.startswith('<environment_context>'): return True return False def load_session_messages(path: Path, include_environment: bool = False) -> SessionData: session_id: str | None = None session_cwd: str | None = None messages: list[DialogMessage] = [] last_key: tuple[str, str] | None = None with path.open(encoding='utf-8') as fh: for line in fh: row = json.loads(line) row_type = row.get('type') payload = row.get('payload') or {} if row_type == 'session_meta' and isinstance(payload, dict): value = payload.get('id') cwd = payload.get('cwd') if isinstance(value, str) and value: session_id = value if isinstance(cwd, str) and cwd: session_cwd = cwd continue if row_type != 'response_item' or not isinstance(payload, dict): continue if payload.get('type') != 'message': continue role = payload.get('role') text = extract_text_parts(payload.get('content') or []) if should_skip(role, text, include_environment): continue key = (role, normalize_text(text)) if key == last_key: continue last_key = key messages.append(DialogMessage(role=role, text=text)) return SessionData(session_id=session_id, messages=messages, cwd=session_cwd) def group_dialogs(messages: list[DialogMessage]) -> list[list[DialogMessage]]: dialogs: list[list[DialogMessage]] = [] current: list[DialogMessage] = [] for message in messages: if message.role == 'user': if current: dialogs.append(current) current = [message] continue if current: current.append(message) if current: dialogs.append(current) return dialogs def infer_title(session_data: SessionData, path: Path) -> str: for message in session_data.messages: if message.role == 'user' and message.text: return message.text.splitlines()[0] return path.stem def read_thread_row(codex_home: Path, match: SessionMatch, session_data: SessionData | None = None) -> sqlite3.Row | None: db_path = codex_home / 'state_5.sqlite' if not db_path.exists(): return None try: conn = sqlite3.connect(db_path) conn.row_factory = sqlite3.Row row = conn.execute( "select * from threads where rollout_path = ? limit 1", (str(match.file_path),), ).fetchone() if row is None: sid = None if session_data and session_data.session_id: sid = session_data.session_id elif match.session_id: sid = match.session_id if sid: row = conn.execute( "select * from threads where id = ? limit 1", (sid,), ).fetchone() conn.close() return row except Exception: # noqa: BLE001 return None def read_thread_sort_key(codex_home: Path, match: SessionMatch) -> int | None: row = read_thread_row(codex_home, match) if row is None: return None keys = row.keys() if 'updated_at_ms' in keys: value = row['updated_at_ms'] if isinstance(value, int): return value if 'updated_at' in keys: value = row['updated_at'] if isinstance(value, int): return value * 1000 return None def read_resume_title(codex_home: Path, match: SessionMatch, session_data: SessionData) -> str | None: row = read_thread_row(codex_home, match, session_data) if row is None: return None title = row['title'] return title if isinstance(title, str) and title else None def format_sort_key(sort_key: int | None, fallback_path: Path) -> str: if sort_key is not None: return datetime.fromtimestamp(sort_key / 1000, tz=timezone.utc).strftime('%Y-%m-%d %H:%M:%SZ') return datetime.fromtimestamp(fallback_path.stat().st_mtime, tz=timezone.utc).strftime('%Y-%m-%d %H:%M:%SZ') def truncate_title(title: str, max_len: int = 60) -> str: if len(title) <= max_len: return title return title[: max_len - 3] + '...' def is_effectively_empty_thread(codex_home: Path, match: SessionMatch, session_data: SessionData) -> bool: title = read_resume_title(codex_home, match, session_data) if title: match.title = title return False return len(session_data.messages) == 0 def render_list_output(target_path: Path, codex_home: Path, include_environment: bool, show_path: bool = False) -> str: lines = [f'# workspace: {target_path}', ''] if target_path.is_file(): matches = [SessionMatch(file_path=target_path, session_id=None, cwd=None)] elif target_path.is_dir(): matches = find_sessions_by_workspace(target_path, codex_home) else: raise FileNotFoundError(f'path not found: {target_path}') for match in matches: session_data = load_session_messages(match.file_path, include_environment=include_environment) if is_effectively_empty_thread(codex_home, match, session_data): continue raw_title = match.title or infer_title(session_data, match.file_path) title = truncate_title(raw_title) session_id = session_data.session_id or match.session_id or '-' updated = format_sort_key(match.sort_key, match.file_path) base = f'{updated} | {session_id} | {title}' lines.append(f'{base} | {match.file_path}' if show_path else base) return '\n'.join(lines).rstrip() + '\n' def render_output( session_id: str | None, path: Path, messages: list[DialogMessage], last: int | None = None, ) -> str: actual_session = session_id or path.stem lines = [f'# session: {actual_session}', f'# file: {path}', ''] if last is None: for message in messages: lines.append(f'{message.role}: {message.text}') return '\n'.join(lines).rstrip() + '\n' dialogs = group_dialogs(messages) if last < 0: raise ValueError('--last must be >= 0') selected = dialogs[-last:] if last else [] for index, dialog in enumerate(selected, 1): lines.append(f'## dialog {index}') for message in dialog: lines.append(f'{message.role}: {message.text}') lines.append('') return '\n'.join(lines).rstrip() + '\n' def main() -> int: parser = build_parser() args = parser.parse_args() try: codex_home = Path(args.codex_home).expanduser() target_path = Path(args.target).expanduser() if args.list: output = render_list_output( target_path, codex_home=codex_home, include_environment=args.include_environment, show_path=args.show_path, ) else: path = resolve_target(args.target, codex_home) session_data = load_session_messages( path, include_environment=args.include_environment ) output = render_output( session_data.session_id, path, session_data.messages, last=args.last, ) except Exception as exc: # noqa: BLE001 print(f'error: {exc}', file=sys.stderr) return 1 sys.stdout.write(output) return 0 if __name__ == '__main__': raise SystemExit(main()) 1 个帖子 - 1 位参与者 阅读完整话题

v2ex · 2026-05-29 15:36:12+08:00 · tech

如题,最近迷上了摄影,在建立自己的图片素材库,但是感觉 Eagle 不够好用,再加上自己也比较喜欢原生 App 的使用体验,于是和 Codex 一起写了个图片素材管理 App ,基于 SwiftUI + AppKit ,界面用了系统的 Liquid Glass 。 现在主要功能有这些: 可以创建多个独立的素材库,把图片、GIF 或整个文件夹导入进去。 导入时会做去重,相同文件不会反复占空间。 支持瀑布流、网格、列表三种视图,灵感浏览和快速扫描都能用。 可以用收藏、标签、文件夹来整理素材。 导入文件夹时会尽量保留原来的目录层级。 会自动分析图片颜色,之后可以色系筛选。 右侧检查器可以看预览、标题、色板、标签、文件夹、尺寸、文件信息和 EXIF 。 支持空格预览,选中图片后也可以直接拖到 Finder 、桌面或项目文件夹里。 也做了浏览器导入插件,可以从浏览器里把批量导入小红书和 ins 的图片到 App 里 (这个我现在还蛮喜欢用的,保存小红书的图很方便)。 目前只支持 MacOS 26 (因为大量使用了 Liquid Glass 效果) 它比较适合几类人: 设计师:收集参考图、Moodboard 、界面截图、品牌素材。 摄影师:整理样片、查看 EXIF 、按颜色或标签归类。 内容创作者:存封面参考、素材图、灵感图。 独立开发者:整理 App 截图、官网图、发布素材和社媒配图。 如果你平时也有一堆图片素材不知道该放哪,可以试试看: 项目地址: https://github.com/Seaony/Momento 如果有哪些功能没有考虑到,也欢迎给我提 feature request 。 下面是界面预览:

v2ex · 2026-05-29 14:36:16+08:00 · tech

如题,最近迷上了摄影,在建立自己的图片素材库,但是感觉 Eagle 不够好用,再加上自己也比较喜欢原生 App 的使用体验,于是和 Codex 一起写了个图片素材管理 App ,基于 SwiftUI + AppKit ,界面用了系统的 Liquid Glass 。 现在主要功能有这些: 可以创建多个独立的素材库,把图片、GIF 或整个文件夹导入进去。 导入时会做去重,相同文件不会反复占空间。 支持瀑布流、网格、列表三种视图,灵感浏览和快速扫描都能用。 可以用收藏、标签、文件夹来整理素材。 导入文件夹时会尽量保留原来的目录层级。 会自动分析图片颜色,之后可以色系筛选。 右侧检查器可以看预览、标题、色板、标签、文件夹、尺寸、文件信息和 EXIF 。 支持空格预览,选中图片后也可以直接拖到 Finder 、桌面或项目文件夹里。 也做了浏览器导入插件,可以从浏览器里把批量导入小红书和 ins 的图片到 App 里 (这个我现在还蛮喜欢用的,保存小红书的图很方便)。 目前只支持 MacOS 26 (因为大量使用了 Liquid Glass 效果) 它比较适合几类人: 设计师:收集参考图、Moodboard 、界面截图、品牌素材。 摄影师:整理样片、查看 EXIF 、按颜色或标签归类。 内容创作者:存封面参考、素材图、灵感图。 独立开发者:整理 App 截图、官网图、发布素材和社媒配图。 如果你平时也有一堆图片素材不知道该放哪,可以试试看: 项目地址: https://github.com/Seaony/Momento 如果有哪些功能没有考虑到,也欢迎给我提 feature request 。 下面是界面预览: