目录
信息处理板块
【信息罗列,一些引用链接】
【表格的罗列,用于对照信息】
Column 1 | Column 2 |
---|---|
name | contents |
name | contents |
name | contents |
Column 1 | Column 2 |
---|---|
centered contents | right-aligned contents |
【公式,数理知识罗列】
Gamma公式展示 Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N Γ(n)=(n−1)!∀n∈N 是通过 Euler integral
Γ
(
z
)
=
∫
0
∞
t
z
−
1
e
−
t
d
t
.
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
Γ(z)=∫0∞tz−1e−tdt.
不够熟悉Latex的一个技巧,在线Latex公式生成器:链接: link
代码模块
【说明一些代码模块的从属关系的图】
先给个简单的
再来个高级的,很酷吧(但用不上,简单的是最好的)
或者用mermaid插入流程图
【代码注释】
我的规则:
- 代码不能复现,不写
- 不加备注的代码不写,哪怕备注很少
- 之后自己不会点开看的,没有重复使用意义的代码不写
先写描述
这是代码描述,说明代码的意义是什么
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 |
我是注脚的解释 ↩︎