obsidian博客联动方案

news2026/5/22 6:25:21
平台文章具有滞后性最新文章请访问https://blog.nuoyis.net原先博客需要使用typorapicgotypecho其中typora编写完毕后需要复制到typecho后台去极其不方便然后经过高人指点我对该软件交互使用开发了新高度obsidian是一个开源的笔记/文档编写软件软件开放性不错可以装插件使用。主要优点是基于git 的同步多端提交的内容可以看到历史记录写了什么甚至可以回头复制误删的内容。首先放出搭建思路看起来很复杂是吧下面开始列出需要此框架的md大纲如果懂一些便于跳到下一个环节注: 以下基于windows平台但是不代表配置方面差别很大尤其是gitlinux反而更好用gitee github仓库创建与同步注gitee 同步到github或者 通过hook同步到gitee需要github token,建议申请后自行加密备份到网盘或者本地不起眼的位置(可以与github登录密码一致防止忘记),否则你删除或重新创建了后续仓库都要重新配置token麻烦且得不偿失gitee官网: https://gitee.com/github官网: https://github.com/这里不教怎么创建账号如果真不知道怎么创建百度一下是很重要的创建仓库github创建仓库这里创建的md由于部分文档不便透露就需要privite(私密)这样基本仓库就建好了推荐吧Add README 开启不然你需要手动创建分支获取token建议是这几个权限当然你要全开也没问题不用的key一定要删除gitee创建仓库从github/gitlab导入仓库如果你github设置好了gitee可以快捷导入github仓库找到导入github仓库然后导入你github创建的仓库就行全新部署如果你只想搞gitee 不搞后续的话如图所示(和github差不多)仓库互同注:1.担心github很慢的可以试试如果介意则直接跳过这里2.2026/05/21后nuoyis已经抛弃gitee双向同步因为同步老超时,这里仅演示首先需要获得github token(看上面github部分),然后点击管理-仓库镜像管理-添加镜像然后拿着令牌和输入你github仓库名添加同步即可。obsidian、git下载以及配置下载地址git下载地址: https://github.com/git-for-windows/git/releases/download/v2.54.0.windows.1/Git-2.54.0-64-bit.exeobsidian下载地址: https://obsidian.md/download文件加速下载(百度云盘代理): https://pan.nuoyis.net安装先把git安装然后安装obsidian安装这里不重点讲解全程下一步就行obsidian配置首先你的obsidian首次进入会是这个界面点击新建仓库起名称不影响远程仓库名然后指定仓库位置我的仓库位置在此电脑-文档里可自定义位置。创建完毕后如图所示然后左边可以创建文件夹也可以创建git配置2026/05/21 gitee同步太狗屎了用ssh版 github上传基本不卡email是邮箱然后name是用户名下面命令配置好就行然后需要将%USERPROFILE%/.ssh下id_rsa.pub内容复制到github 后台。直达链接git config --global user.name name git config --global user.email email ssh-keygen -t rsa -C email上传用此命令git init git remote add origin gitgithub.com:nuoyis/makedown.git git branch --set-upstream-toorigin/master master git pull git push --set-upstream origin mastergithub actions 分仓库配置makedown仓库流水线流水线由openclaw编写测试无问题可自行二次修改这里直接粘贴防止后续下载失效感谢你的理解放在仓库根目录下的脚本add-frontmatter.sh#!/usr/bin/env bash # add-frontmatter.sh # 为没有 YAML frontmatter 的 Markdown 文件添加头部 # # 用法: ./add-frontmatter.sh 目录1 [目录2] [目录3] ... # # 逻辑: # 1. 已有 frontmatter → 提取 date/categories/title 复制到新格式 # 2. 没有 frontmatter → 根据 git commit 时间生成 date文件名生成 title第一层目录名生成 categories set -euo pipefail RED\033[0;31m GREEN\033[0;32m YELLOW\033[1;33m NC\033[0m log_info() { echo -e ${GREEN}[INFO]${NC} $*; } log_warn() { echo -e ${YELLOW}[WARN]${NC} $*; } log_error() { echo -e ${RED}[ERROR]${NC} $*; } # ------------------------------------------------------- # 从 Markdown 文件提取已有 frontmatter 字段 # 返回: title / date / categories (全局变量) # ------------------------------------------------------- extract_frontmatter() { local file$1 _TITLE _DATE _CATEGORIES _TAGS[] # 取 --- 之间的内容 local in_front0 local fm_lines() while IFS read -r line; do if [[ $line --- ]]; then ((in_front)) || true if (( in_front 2 )); then break fi continue fi if (( in_front 1 )); then fm_lines($line) fi done $file for line in ${fm_lines[]}; do # title if [[ $line ~ ^title:\ *\?(.?)\?\ *$ ]]; then _TITLE${BASH_REMATCH[1]} # 去掉可能残留的引号 _TITLE${_TITLE%\} _TITLE${_TITLE#\} fi # date if [[ $line ~ ^date:\ *(.)$ ]]; then _DATE${BASH_REMATCH[1]} _DATE${_DATE%${_DATE##*[![:space:]]}} # trim trailing fi # categories (单行列表形式: categories: [a, b]) if [[ $line ~ ^categories:\ *\[(.)\] ]]; then _CATEGORIES${BASH_REMATCH[1]} _CATEGORIES${_CATEGORIES// /} # 去空格 fi # categories (多行形式取第一个 - xxx) if [[ $line ~ ^-\ (.)$ ]] [[ -z $_CATEGORIES ]]; then _CATEGORIES${BASH_REMATCH[1]} fi # tags if [[ $line ~ ^tags:\ *(.)$ ]]; then _TAGS${BASH_REMATCH[1]} fi done } # ------------------------------------------------------- # 判断文件是否已有 frontmatter # ------------------------------------------------------- has_frontmatter() { local file$1 local first_line first_line$(head -1 $file | tr -d [:space:]) [[ $first_line --- ]] } # ------------------------------------------------------- # 从 git 获取文件的最早提交时间 (ISO 格式) # ------------------------------------------------------- git_commit_date() { local file$1 local dir dir$(dirname $file) # 找到最近的 .git 目录 local git_dir local check$dir while [[ $check ! / ]]; do if [[ -d $check/.git ]]; then git_dir$check break fi check$(dirname $check) done if [[ -n $git_dir ]]; then local rel_path rel_path$(realpath --relative-to$git_dir $file) # 获取最早的提交时间 local ts ts$(git -C $git_dir log --diff-filterA --follow --format%aI -- $rel_path 2/dev/null | tail -1) if [[ -n $ts ]]; then # 转成 YYYY-MM-DD HH:MM:SS echo ${ts:0:10} ${ts:11:8} return fi fi # fallback: 用文件修改时间 local mtime mtime$(stat -c %y $file 2/dev/null || stat -f %Sm $file 2/dev/null) echo ${mtime:0:19} } # ------------------------------------------------------- # 从文件名生成 title去掉扩展名把 - 和 _ 变空格 # 你可以自定义这个函数来改变 title 生成逻辑 # ------------------------------------------------------- filename_to_title() { local file$1 local basename basename$(basename $file) # 去掉扩展名其余原样保留如 C语言-关键字.md → C语言-关键字 basename${basename%.md} basename${basename%.markdown} echo $basename } # ------------------------------------------------------- # 从第一层目录名生成 category # ------------------------------------------------------- get_category() { local file$1 local base_dir$2 local rel_path rel_path$(realpath --relative-to$base_dir $file) local first_dir${rel_path%%/*} # 如果文件直接在 base_dir 下分类为 default if [[ $first_dir $rel_path ]]; then echo default else echo $first_dir fi } # ------------------------------------------------------- # 写入 frontmatter 到文件插入到开头 # ------------------------------------------------------- write_frontmatter() { local file$1 local title$2 local date$3 local categories$4 local tags${5:-[]} # 构建 frontmatter local fm--- fm$\ntitle: ${title} fm$\ndate: ${date} if [[ -n $categories ]]; then fm$\ncategories: [${categories}] fi fm$\ntags: ${tags} fm$\n---$\n # 如果已有 frontmatter先去掉 if has_frontmatter $file; then # 去掉第一个 --- 和第二个 --- 之间的内容含两行 --- local tmp tmp$(awk BEGIN { found0; in_fm0 } /^---[[:space:]]*$/ { if (found 0) { found1; in_fm1; next } else if (in_fm 1) { in_fm0; next } } in_fm 0 { print } $file) echo $fm$tmp $file else # 直接在前面插入 local content content$(cat $file) echo $fm$content $file fi } # ------------------------------------------------------- # 主逻辑 # ------------------------------------------------------- main() { if [[ $# -eq 0 ]]; then echo 用法: $0 目录1 [目录2] ... echo echo 为没有 YAML frontmatter 的 Markdown 文件添加头部。 echo 已有 frontmatter 的文件会提取字段重新格式化。 exit 1 fi local processed0 local skipped0 local errors0 for base_dir in $; do if [[ ! -d $base_dir ]]; then log_error 目录不存在: $base_dir ((errors)) || true continue fi log_info 扫描目录: $base_dir # 遍历所有 .md / .markdown 文件只第一层及子目录跳过第二层以下由 find 控制 while IFS read -r -d file; do # 跳过隐藏文件和 node_modules 等 [[ $file */.* ]] continue [[ $file */node_modules/* ]] continue log_info 处理: $file if has_frontmatter $file; then # 已有 frontmatter → 提取字段 extract_frontmatter $file local title$_TITLE local date$_DATE local categories$_CATEGORIES local tags$_TAGS # 如果提取不到 date用 git 时间 if [[ -z $date ]]; then date$(git_commit_date $file) log_warn frontmatter 中无 date使用 git commit 时间: $date fi # 如果提取不到 title用文件名 if [[ -z $title ]]; then title$(filename_to_title $file) log_warn frontmatter 中无 title使用文件名: $title fi # 如果提取不到 categories用目录名 if [[ -z $categories ]]; then categories$(get_category $file $base_dir) log_warn frontmatter 中无 categories使用目录名: $categories fi # 重新写入格式化后的 frontmatter write_frontmatter $file $title $date $categories $tags log_info ✓ 已更新 frontmatter (title$title, date$date, cat$categories) else # 没有 frontmatter → 生成 local title title$(filename_to_title $file) local date date$(git_commit_date $file) local categories categories$(get_category $file $base_dir) write_frontmatter $file $title $date $categories [] log_info ✓ 已添加 frontmatter (title$title, date$date, cat$categories) fi ((processed)) || true done (find $base_dir -mindepth 1 -type f \( -name *.md -o -name *.markdown \) -print0) # 不限深度所有 md 都处理 done echo log_info 完成处理: $processed | 跳过: $skipped | 错误: $errors } main $放在.github/workflows内的流水线# sync-to-hexo.yml # 放在 Repo A (obsidian-sync) 的 .github/workflows/ 下 # # 功能 # 1. 当 public/ 目录有变更时触发 # 2. 处理 public/ 下所有 md 文件的 frontmatter # 3. 推送到 Repo B 的 source/_posts/ # # 需要的 Secrets (在 makedown 仓库的 Settings → Secrets 配置) # HEXO_REPO_TOKEN - 一个有 repo 权限的 GitHub PAT (Fine-grained token) # 用于 push 到 blog-inset name: Sync to Hexo Blog on: push: branches: [main, master] paths: - public/** # 也支持手动触发 workflow_dispatch: # 避免同时跑多次 concurrency: group: sync-hexo cancel-in-progress: true jobs: sync: runs-on: ubuntu-latest steps: # ── 1. 拉取 Repo A当前仓库── - name: Checkout Repo A uses: actions/checkoutv4 with: fetch-depth: 0 # 需要完整 git history 来获取文件创建时间 # ── 2. 拉取 Repo BHexo 博客仓库── - name: Checkout Repo B uses: actions/checkoutv4 with: repository: nuoyis/blog-inset token: ${{ secrets.HEXO_REPO_TOKEN }} path: hexo-blog fetch-depth: 1 # ── 3. 检查 public/ 是否存在 ── - name: Check public directory id: check run: | if [ -d public ] [ -n $(find public/ -type f -name *.md 2/dev/null) ]; then echo has_contenttrue $GITHUB_OUTPUT echo ✓ public/ 目录存在且有 md 文件 else echo has_contentfalse $GITHUB_OUTPUT echo ⚠ public/ 目录不存在或无 md 文件跳过 fi # ── 4. 处理 public/ 下的 md 文件添加/修复 frontmatter ── - name: Process frontmatter if: steps.check.outputs.has_content true run: | chmod x add-frontmatter.sh ./add-frontmatter.sh public/ # ── 5. 智能增量同步到 Repo B 的 source/_posts/ ── - name: Sync to Hexo source if: steps.check.outputs.has_content true run: | TARGEThexo-blog/source/_posts STAGING$(mktemp -d) mkdir -p $TARGET # ── 5a. 把 public/ 打平到临时目录 ── cd public/ find . -mindepth 1 -type f \( -name *.md -o -name *.markdown \) | while read -r file; do [[ $file */.* ]] continue filename$(basename $file) # 同名文件加分类前缀 if [ -f $STAGING/$filename ]; then dir_prefix$(echo $file | sed s|^\./|| | cut -d/ -f1) if [ $dir_prefix ! $filename ]; then filename${dir_prefix}-${filename} fi fi cp $file $STAGING/$filename done cd .. echo 临时目录文件: ls $STAGING/ echo echo _posts 现有文件: ls $TARGET/ 2/dev/null || echo (空) echo # ── 5b. 去掉 md 文件的 YAML frontmatter只留正文 ── strip_frontmatter() { awk BEGIN { found0; in_fm0 } /^---[[:space:]]*$/ { if (found 0) { found1; in_fm1; next } else if (in_fm 1) { in_fm0; next } } in_fm 0 { print } $1 } # ── 5c. 逐个文件比对智能同步 ── added0 updated0 skipped0 for staging_file in $STAGING/*.md $STAGING/*.markdown; do [ -f $staging_file ] || continue filename$(basename $staging_file) target_file$TARGET/$filename if [ ! -f $target_file ]; then # _posts 里没有 → 新文章带头部复制 cp $staging_file $target_file echo ➕ 新增: $filename ((added)) || true else # _posts 里有 → 比较正文是否变化 staging_body$(strip_frontmatter $staging_file) target_body$(strip_frontmatter $target_file) staging_sha$(echo $staging_body | sha256sum | cut -d -f1) target_sha$(echo $target_body | sha256sum | cut -d -f1) if [ $staging_sha ! $target_sha ]; then # 正文有变化 → 替换正文保留 _posts 原来的头部 original_fm$(awk BEGIN { found0; in_fm0 } /^---[[:space:]]*$/ { if (found 0) { found1; in_fm1; print; next } else if (in_fm 1) { in_fm0; print; next } } in_fm 1 { print } $target_file) new_body$(strip_frontmatter $staging_file) # 写入原头部 新正文 { echo $original_fm; echo ; echo $new_body; } $target_file echo 更新: $filename (保留原头部) ((updated)) || true else echo ⏭️ 跳过: $filename (内容无变化) ((skipped)) || true fi fi done rm -rf $STAGING echo echo ✓ 同步完成: 新增 $added | 更新 $updated | 跳过 $skipped # ── 6. 提交并推送到 Repo B ── - name: Push to Repo B if: steps.check.outputs.has_content true run: | cd hexo-blog # 配置 git git config user.name github-actions[bot] git config user.email github-actions[bot]users.noreply.github.com # 先 add再检查是否有实际差异包含未跟踪的新文件 git add source/_posts/ echo Git status: git status --short echo if git diff --cached --quiet; then echo 没有变更跳过推送 exit 0 fi git commit -m chore: sync articles from obsidian [$(date %Y-%m-%d)] git push origin HEAD echo ✓ 已推送到 Hexo 仓库hexo仓库依旧去Settings → Secrets 配置 名叫token的机密变量防止token泄露Hexo本地部署和安装安装nodejs下载 https://nodejs.org/dist/v24.15.0/node-v24.15.0-x64.msi配置加速源npm config set registry https://registry.npmmirror.com npm install -g pnpm pnpm config set registry https://registry.npmmirror.com安装hexopnpm install -g hexo-cli hexo init pnpm install pnpm install hexo-deployer-git --save配置config.yaml,修改以下位置成以下内容(url是你的仓库地址)其他自行修改# Deployment # Docs: https://hexo.io/docs/one-command-deployment deploy: type: git repo: github: url: https://github.com/nuoyis/nuoyis.github.io.git branch: master token: $token上传到github流水线name: nuoyiss blog Pages build on: push: branches: - main permissions: contents: write packages: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkoutv4 - name: Use pnpm uses: pnpm/action-setupv6 with: version: 10 - name: Cache NPM dependencies uses: actions/cachev4 with: path: node_modules key: ${{ runner.OS }}-npm-cache restore-keys: | ${{ runner.OS }}-npm-cache - name: Install Hexo run: | rm -rf node_modules pnpm install pnpm install -g hexo-cli - name: Hexo generate run: | hexo clean hexo generate - name: Hexo deploy run: | git config --global user.name nuoyis git config --global user.email wkkjonlykangvip.qq.com hexo deploy env: token: ${{ secrets.token }}picgo 安装与配置首先得有云存储(upyun,七牛云,腾讯云和阿里云存储桶)然后官方有教程点击进入扩展: edgeone pages配置首先得有腾讯云账号打开控制台搜索edgeone我这里可能是那个兑换码的免费版然后绑定仓库绑定自定义域名就行如果没有备案选择全球非大陆即可(但是我还是建议没备案还是别用了cloudflare pages国内优选国外默认的那种dns设置比这个pages快)选择你的仓库比如我的是nuoyis.github.io可用区选择中国大陆和全球可用区需要备案号和实名认证这里任选其一hexo仓库生成完毕后一定是html如果你用我的需要选择html仓库(分支默认为master,这里为演示仓库),框架选择other绑定域名

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2633907.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

SpringBoot-17-MyBatis动态SQL标签之常用标签

文章目录 1 代码1.1 实体User.java1.2 接口UserMapper.java1.3 映射UserMapper.xml1.3.1 标签if1.3.2 标签if和where1.3.3 标签choose和when和otherwise1.4 UserController.java2 常用动态SQL标签2.1 标签set2.1.1 UserMapper.java2.1.2 UserMapper.xml2.1.3 UserController.ja…

wordpress后台更新后 前端没变化的解决方法

使用siteground主机的wordpress网站,会出现更新了网站内容和修改了php模板文件、js文件、css文件、图片文件后,网站没有变化的情况。 不熟悉siteground主机的新手,遇到这个问题,就很抓狂,明明是哪都没操作错误&#x…

网络编程(Modbus进阶)

思维导图 Modbus RTU(先学一点理论) 概念 Modbus RTU 是工业自动化领域 最广泛应用的串行通信协议,由 Modicon 公司(现施耐德电气)于 1979 年推出。它以 高效率、强健性、易实现的特点成为工业控制系统的通信标准。 包…

UE5 学习系列(二)用户操作界面及介绍

这篇博客是 UE5 学习系列博客的第二篇,在第一篇的基础上展开这篇内容。博客参考的 B 站视频资料和第一篇的链接如下: 【Note】:如果你已经完成安装等操作,可以只执行第一篇博客中 2. 新建一个空白游戏项目 章节操作,重…

IDEA运行Tomcat出现乱码问题解决汇总

最近正值期末周,有很多同学在写期末Java web作业时,运行tomcat出现乱码问题,经过多次解决与研究,我做了如下整理: 原因: IDEA本身编码与tomcat的编码与Windows编码不同导致,Windows 系统控制台…

利用最小二乘法找圆心和半径

#include <iostream> #include <vector> #include <cmath> #include <Eigen/Dense> // 需安装Eigen库用于矩阵运算 // 定义点结构 struct Point { double x, y; Point(double x_, double y_) : x(x_), y(y_) {} }; // 最小二乘法求圆心和半径 …

使用docker在3台服务器上搭建基于redis 6.x的一主两从三台均是哨兵模式

一、环境及版本说明 如果服务器已经安装了docker,则忽略此步骤,如果没有安装,则可以按照一下方式安装: 1. 在线安装(有互联网环境): 请看我这篇文章 传送阵>> 点我查看 2. 离线安装(内网环境):请看我这篇文章 传送阵>> 点我查看 说明&#xff1a;假设每台服务器已…

XML Group端口详解

在XML数据映射过程中&#xff0c;经常需要对数据进行分组聚合操作。例如&#xff0c;当处理包含多个物料明细的XML文件时&#xff0c;可能需要将相同物料号的明细归为一组&#xff0c;或对相同物料号的数量进行求和计算。传统实现方式通常需要编写脚本代码&#xff0c;增加了开…

LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器的上位机配置操作说明

LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器专为工业环境精心打造&#xff0c;完美适配AGV和无人叉车。同时&#xff0c;集成以太网与语音合成技术&#xff0c;为各类高级系统&#xff08;如MES、调度系统、库位管理、立库等&#xff09;提供高效便捷的语音交互体验。 L…

(LeetCode 每日一题) 3442. 奇偶频次间的最大差值 I (哈希、字符串)

题目&#xff1a;3442. 奇偶频次间的最大差值 I 思路 &#xff1a;哈希&#xff0c;时间复杂度0(n)。 用哈希表来记录每个字符串中字符的分布情况&#xff0c;哈希表这里用数组即可实现。 C版本&#xff1a; class Solution { public:int maxDifference(string s) {int a[26]…

【大模型RAG】拍照搜题技术架构速览:三层管道、两级检索、兜底大模型

摘要 拍照搜题系统采用“三层管道&#xff08;多模态 OCR → 语义检索 → 答案渲染&#xff09;、两级检索&#xff08;倒排 BM25 向量 HNSW&#xff09;并以大语言模型兜底”的整体框架&#xff1a; 多模态 OCR 层 将题目图片经过超分、去噪、倾斜校正后&#xff0c;分别用…

【Axure高保真原型】引导弹窗

今天和大家中分享引导弹窗的原型模板&#xff0c;载入页面后&#xff0c;会显示引导弹窗&#xff0c;适用于引导用户使用页面&#xff0c;点击完成后&#xff0c;会显示下一个引导弹窗&#xff0c;直至最后一个引导弹窗完成后进入首页。具体效果可以点击下方视频观看或打开下方…

接口测试中缓存处理策略

在接口测试中&#xff0c;缓存处理策略是一个关键环节&#xff0c;直接影响测试结果的准确性和可靠性。合理的缓存处理策略能够确保测试环境的一致性&#xff0c;避免因缓存数据导致的测试偏差。以下是接口测试中常见的缓存处理策略及其详细说明&#xff1a; 一、缓存处理的核…

龙虎榜——20250610

上证指数放量收阴线&#xff0c;个股多数下跌&#xff0c;盘中受消息影响大幅波动。 深证指数放量收阴线形成顶分型&#xff0c;指数短线有调整的需求&#xff0c;大概需要一两天。 2025年6月10日龙虎榜行业方向分析 1. 金融科技 代表标的&#xff1a;御银股份、雄帝科技 驱动…

观成科技:隐蔽隧道工具Ligolo-ng加密流量分析

1.工具介绍 Ligolo-ng是一款由go编写的高效隧道工具&#xff0c;该工具基于TUN接口实现其功能&#xff0c;利用反向TCP/TLS连接建立一条隐蔽的通信信道&#xff0c;支持使用Let’s Encrypt自动生成证书。Ligolo-ng的通信隐蔽性体现在其支持多种连接方式&#xff0c;适应复杂网…

铭豹扩展坞 USB转网口 突然无法识别解决方法

当 USB 转网口扩展坞在一台笔记本上无法识别,但在其他电脑上正常工作时,问题通常出在笔记本自身或其与扩展坞的兼容性上。以下是系统化的定位思路和排查步骤,帮助你快速找到故障原因: 背景: 一个M-pard(铭豹)扩展坞的网卡突然无法识别了,扩展出来的三个USB接口正常。…

未来机器人的大脑:如何用神经网络模拟器实现更智能的决策?

编辑&#xff1a;陈萍萍的公主一点人工一点智能 未来机器人的大脑&#xff1a;如何用神经网络模拟器实现更智能的决策&#xff1f;RWM通过双自回归机制有效解决了复合误差、部分可观测性和随机动力学等关键挑战&#xff0c;在不依赖领域特定归纳偏见的条件下实现了卓越的预测准…

Linux应用开发之网络套接字编程(实例篇)

服务端与客户端单连接 服务端代码 #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <arpa/inet.h> #include <pthread.h> …

华为云AI开发平台ModelArts

华为云ModelArts&#xff1a;重塑AI开发流程的“智能引擎”与“创新加速器”&#xff01; 在人工智能浪潮席卷全球的2025年&#xff0c;企业拥抱AI的意愿空前高涨&#xff0c;但技术门槛高、流程复杂、资源投入巨大的现实&#xff0c;却让许多创新构想止步于实验室。数据科学家…

深度学习在微纳光子学中的应用

深度学习在微纳光子学中的主要应用方向 深度学习与微纳光子学的结合主要集中在以下几个方向&#xff1a; 逆向设计 通过神经网络快速预测微纳结构的光学响应&#xff0c;替代传统耗时的数值模拟方法。例如设计超表面、光子晶体等结构。 特征提取与优化 从复杂的光学数据中自…