【自留】CSDN发布博文的模版 磨刀不误砍柴工

信息处理板块

【信息罗列,一些引用链接】

链接: link
论文引用注脚:一个具有注脚的文本。1

【表格的罗列,用于对照信息】

Column 1Column 2
namecontents
namecontents
namecontents
Column 1Column 2
centered contentsright-aligned contents

【公式,数理知识罗列】

Gamma公式展示 Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N Γ(n)=(n1)!nN 是通过 Euler integral

Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=0tz1etdt.
不够熟悉Latex的一个技巧,在线Latex公式生成器:链接: link

代码模块

【说明一些代码模块的从属关系的图】

先给个简单的

C
圆角长方形
B
菱形

再来个高级的,很酷吧(但用不上,简单的是最好的)

Option 1
Option 2
Option 3
Option 1
Option 2
Option 3
Start
Initialize Process
Decision Point 1
Step 1.1
Step 1.2
Step 1.3
Next Step

或者用mermaid插入流程图

Created with Raphaël 2.3.0 开始 我的操作 确认? 结束 yes no

【代码注释】

我的规则:

  1. 代码不能复现,不写
  2. 不加备注的代码不写,哪怕备注很少
  3. 之后自己不会点开看的,没有重复使用意义的代码不写
先写描述

这是代码描述,说明代码的意义是什么
e.g. 从文本文件中读取包含特定关键词的行,并假设关键词后面紧跟着一个向量(用方括号括起来的一系列数字)。然后,它将这些向量的内容提取出来,并保存到一个新的文本文件中。

代码内容

要注释

# Define the path to the input file and the output file
input_file_path = 'input.txt'
output_file_path = 'output_vectors.txt'

# Define the keyword to search for
keyword = 'vector'

# Open the input file for reading and the output file for writing
with open(input_file_path, 'r') as infile, open(output_file_path, 'w') as outfile:
    # Read each line in the input file
    for line in infile:
        # Check if the keyword is in the line
        if keyword in line:
            # Try to find the vector starting with '[' and ending with ']'
            start = line.find('[')
            end = line.find(']')
            # If both '[' and ']' are found, we assume this is a vector
            if start != -1 and end != -1 and start < end:
                # Extract the vector content without brackets
                vector_content = line[start + 1:end]
                # Write the extracted vector content to the output file
                outfile.write(vector_content + '\n')  # Add a newline character to separate vectors

# Print a message indicating the task is complete
print(f"Vectors extracted from {input_file_path} and saved to {output_file_path}")
代码的输出,总结

以上代码可以反复要使用,提取文档的向量内容。

快捷键速记,鼠标:我免费了

但是记下来后发现用不了,后面看看为啥吧

快捷键键盘按键
Markdown图标 快捷键
撤销Ctrl /⌘+Z
重做Ctrl /⌘+Y
加粗Ctrl /⌘+B
斜体Ctrl /⌘+I
标题Ctrl /⌘+Shift +H
有序列表Ctrl /⌘+Shift +O
无序列表Ctrl /⌘+Shift +U
待办列表Ctrl /⌘+Shift +C
插入代码Ctrl /⌘+Shift +K
插入链接Ctrl /⌘+Shift +L
插入图片Ctrl /⌘+Shift +G
查找Ctrl /⌘+F
替换Ctrl /⌘+G

  1. 我是注脚的解释 ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值