自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 python thread process pool

from multiprocessing import Process import os 子进程要执行的代码 def run_proc(name): print ‘Run child process %s (%s)…’ % (name, os.getpid()) if name==’main‘: print ‘Parent process %s.’ % os.getpid()...

2018-08-21 17:28:16 390

转载 tee linux echo

echo … | tee -a a b it is used to write into two files.

2018-08-20 15:20:21 235

转载 sed linux

http://man.linuxde.net/sed sed -n ‘p;n’ test.txt #奇数行 sed -n ‘n;p’ test.txt #偶数行 sed -n ‘1~2p’ test.txt #奇数行 sed -n ‘2~2p’ test.txt #偶数行 互换模式空间和保持缓冲区的内容。也就是把包含test与check的行互换: sed -e ‘/test/h...

2018-08-16 22:28:48 159

转载 xargs

echo `xargs<1.txt` | tr ’ ’ ‘,’ note: it is used to combine multiple lines into one line and replace space as “,”

2018-08-16 21:18:46 210

转载 linux array

#! /bin/bash firstArg=$1 default_IFS=”$IFS” IFS=”,” allArg=($firstArg) IFS=”$defalut_IFS” for eachArg in ${allArg[@]} do echo $eachArg done note: it is used to pass arg, arg, arg with $1 int...

2018-08-16 10:16:49 258

转载 python date time jSon dic

#1. def month_scope(start=None): if start is None: raise ValueError(‘start is null’) ingore_var, daysOfMonth = calendar.monthrange(start.year,start.month) firstdayOfNextMonth=...

2018-08-16 10:02:25 241

转载 linux =~ shell

#1 The =~ Regular Expression match operator no longer requires quoting of the pattern within [[ … ]]. 把测试条件换成下面这样就成功了。 if [[ “newip"= ([0−9]1,3.)3[0−9]1,3newip"= ([0−9]1,3.)3[

2018-08-16 09:33:36 253

转载 awk process ' and "

Claim: below content is learnt from other people. 双引号: awk ‘{print “\”“}’ #放大:awk ‘{print ” \” “}’ 使用“”双引号把一个双引号括起来,然后用转义字符\对双引号进行转义,输出双引号。 单引号: awk ‘{print “’\””}’ # 放大: awk ‘{pri...

2018-08-15 17:54:59 230

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除