读书笔记
文章平均质量分 70
读书笔记:
主要包括一些自己喜欢的编程数据的一些私人笔记
当然可能也会包括一些文学类的书籍的笔记
许我少年
这个作者很懒,什么都没留下…
展开
-
Sed and Awk 101 Hacks --2 AWK学习
Sed and Awk 101 Hacks <2> AWK学习Chr8、awk语法和脚本命令awk 命令语法awk -Fs '/pattern/ {action}' input-file (or)awk -Fs '{action}' intput-file$ awk -F: '/mail/ {print $1}' /etc/passwd mail awk -Fs -f myscript.awk input-fileawk 程序结构(BEGIN,body,END原创 2022-05-06 11:54:46 · 219 阅读 · 0 评论 -
Sed and Awk 101 Hacks --1-sed 命令学习
Sed and Awk 101 Hacks(Chr1: sed syntax and basic commands)1.sed command syntax$ cat >employee.txt101,John Doe,CEO102,Jason Smith,IT Manager103,Raj Reddy,Sysadmin104,Anand Ram,Developer105,Jane Miller,Sales Manager2.print (P)#仅打印第二行$ sed -n '原创 2022-05-05 15:33:55 · 733 阅读 · 0 评论 -
Notes of Python Cookbook (Chr4-Chr6)
第四章:迭代器与生成器4.1 手动遍历迭代器遍历一个可迭代对象中的所有元素,但是却不想使用 for 循环。使用 next() 函数并在代码中捕获 StopIteration 异常。比如,下面的例子手动读取一个文件中的所有行# def manual_iter():# with open('/etc/passwd') as f:# try:# while True:# line = next(f)#原创 2022-04-14 16:07:48 · 264 阅读 · 0 评论 -
Notes of Python Cookbook (Chr1-Chr3)
贴子主要关于自己的读书摘要,涉及到侵权请联系删除第一章:数据结构和算法# 任何的序列(或者是可迭代对象)可以通过一个简单的赋值语句解压并赋值给多# 个变量。唯一的前提就是变量的数量必须跟序列元素的数量是一样的。p= (4,5)x,y = pprint(x,y,end='\n')# 1.2 解压可迭代对象赋值给多个变量record = ('Dave', 'dave@example.com', '773-555-1212', '847-555-1212')name, email, *phon原创 2022-04-13 20:43:47 · 649 阅读 · 0 评论 -
01_Dive_into_python (reading note)
难度:*Don’t bury your burden in saintly silence. You have a problem?page 41如有涉及到**知识版权,联系删除SUFFIXES = {1000: ['KB', 'MB', 'GB', 'TB', 'PB', 'EB','ZB', 'YB'], 1024: ['KiB', 'MiB', 'GiB', 'TiB', 'PiB','EiB', 'ZiB', 'YiB']}def approximate_siz原创 2021-11-30 20:52:16 · 473 阅读 · 0 评论