<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Mr_Slower的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Mr_Slower</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Mr_Slower]]></copyright><item><title><![CDATA[grep命令]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/99227053</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/99227053</guid><author>Mr_Slower</author><pubDate>Sat, 22 Aug 2020 09:58:46 +0800</pubDate><description><![CDATA[grep  pattern file1 file2 搜索匹配内容
grep  pattern file1 -o只显示匹配内容
grep  pattern file1 --color=auto增加颜色
grep  -E “pattern” file1 正则表达式匹配
grep  -c pattern file1统计匹配到的行数
grep  -n pattern file1输出匹配到的行数
grep...]]></description><category></category></item><item><title><![CDATA[xargs命令]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/107547379</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/107547379</guid><author>Mr_Slower</author><pubDate>Sat, 22 Aug 2020 09:57:50 +0800</pubDate><description><![CDATA[1. 介绍
xargs主要用于将标准输出转化为命令行参数, 传递给其他命令执行, 因为有些命令并不支持管道命令接收标准输入;
2. 使用


基本使用:
echo "one two three" | xargs mkdir


单独使用:
运行xargs 相当于运行: xargs echo


打印执行的命令:


echo 'one two three' | xargs -p touch  # 打印命令, 确认后执行
echo 'one two three' | xargs -t touch  # 打印命]]></description><category></category></item><item><title><![CDATA[sed命令]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/106266541</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/106266541</guid><author>Mr_Slower</author><pubDate>Sat, 22 Aug 2020 09:57:18 +0800</pubDate><description><![CDATA[1. 格式
sed  选项  sed命令  输入文件
sed   -f  script_file  输入文件  (从文件读取sed命令)
2. 选项




选项
说明




-n
静默输出, 不打印内容


-e
可通过-e指定要执行的多个命令


-f
要执行的命令文件



]]></description><category></category></item><item><title><![CDATA[awk命令]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/106200103</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/106200103</guid><author>Mr_Slower</author><pubDate>Sat, 22 Aug 2020 09:56:22 +0800</pubDate><description><![CDATA[1. 格式
awk  选项 ‘匹配规则{执行命令}’ file_name
例如: awk -F:  '/^$/{print “blank lines”}  test.txt




选项
含义




-F fs
指定分隔符


-f file
指定执行的脚本文件


-v var=val
在执行处理过程之前，设置一个变量 var，并给其设备初始值为 val。


数据变量:
$0: 整行
$n: 第n个数据字段
BEGIN和END关键字: 分别在读取文件前和读取文件后执行;
$ awk 'BEGIN{pr]]></description><category></category></item><item><title><![CDATA[python内置函数]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83383496</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83383496</guid><author>Mr_Slower</author><pubDate>Sun, 15 Dec 2019 09:26:38 +0800</pubDate><description><![CDATA[1.enumerate()

Return an enumerate object.
The enumerate object yields pairs containing a count (from start, which defaults to zero) and a value yielded by the iterable argument.
enumerate is useful f...]]></description><category></category></item><item><title><![CDATA[python关于os模块]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83856270</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83856270</guid><author>Mr_Slower</author><pubDate>Sun, 15 Dec 2019 09:24:53 +0800</pubDate><description><![CDATA[1.介绍:
os模块用于python文件和操作系统的交互
2.os模块函数
(1)

os.path.abspath(path)
Return a normalized absolutized version of the pathname path. On most platforms, this is equivalent to calling the function normpath() ...]]></description><category></category></item><item><title><![CDATA[python关于re模块(正则表达式)]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83689036</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83689036</guid><author>Mr_Slower</author><pubDate>Sun, 15 Dec 2019 09:24:02 +0800</pubDate><description><![CDATA[1.元字符
(1)  \b:

Matches the empty string, but only at the beginning or end of a word. A word is defined as a sequence of word characters. Note that formally, \b is defined as the boundary between a \w...]]></description><category></category></item><item><title><![CDATA[python关于uwsgi]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/90176593</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/90176593</guid><author>Mr_Slower</author><pubDate>Sun, 15 Dec 2019 09:22:32 +0800</pubDate><description><![CDATA[一、定义
1.uWSGI定义
uWSGI是一个web服务器，实现了WSGI协议，uwsgi协议，http协议等。
uWSGI的主要特点是：
超快的性能(c语言编写)
低内存占用
多app管理
详尽的日志功能（可以用来分析app的性能和瓶颈）
高度可定制（内存大小限制，服务一定次数后重启等
2.uwsgi协议
uwsgi：与WSGI一样是一种通信协议，是uWSGI服务器的独占协议，用于定义传输信息的...]]></description><category></category></item><item><title><![CDATA[python关于装饰器]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83410462</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83410462</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:40:08 +0800</pubDate><description><![CDATA[#1.练习
import time


def fucker0(m):
    print(m)

    def fucker(fuc):
        def fucker2(*args, **kwargs):
            st_time=time.time()
            s=fuc(*args, **kwargs)#注意参数传递
            ed_ti...]]></description><category></category></item><item><title><![CDATA[python关于静态属性, 类方法, 静态方法]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83662923</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83662923</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:39:21 +0800</pubDate><description><![CDATA[1.静态属性property
在类的函数属性前加@property可以让该函数以数据属性的方式调用.
注意:1. 静态属性不可传参数,(只有self)
2.类的实例默认无法修改静态属性
3.如果想对实例修改,调用静态属性做限制,可以用setter, getter, deleter,等装饰器.
示例1:property使用
class Test:
    def __init__(self, a, ...]]></description><category></category></item><item><title><![CDATA[python关于metaclass元类]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83684679</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83684679</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:38:56 +0800</pubDate><description><![CDATA[By default, classes are constructed using type(). The class body is executed in a new namespace and the class name is bound locally to the result of type(name, bases, namespace).
The class creation p...]]></description><category></category></item><item><title><![CDATA[python关于namespace和scope(命名空间和作用域)]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83685811</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83685811</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:38:29 +0800</pubDate><description><![CDATA[1.namespace
(1)定义

A namespace is a mapping from names to objects. Most namespaces are currently implemented as Python dictionaries, but that’s normally not noticeable in any way (except for performan...]]></description><category></category></item><item><title><![CDATA[python关于socket模块]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83824376</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83824376</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:38:02 +0800</pubDate><description><![CDATA[1.socket概述

Of the various forms of IPC, sockets are by far the most popular. On any given platform, there are likely to be other forms of IPC that are faster, but for cross-platform communication, so...]]></description><category></category></item><item><title><![CDATA[python关于configparser模块]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/83831452</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/83831452</guid><author>Mr_Slower</author><pubDate>Thu, 25 Apr 2019 14:37:16 +0800</pubDate><description><![CDATA[1.介绍
该模块主要用来操作及设置配置文件, 可以以键值对的形式存放信息.
例如:
[DEFAULT]
ServerAliveInterval = 45
Compression = yes
CompressionLevel = 9
ForwardX11 = yes
  
[bitbucket.org]
User = hg
  
[topsecret.server.com]
Port = 50022...]]></description><category></category></item><item><title><![CDATA[python关于subprocess模块]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/88841593</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/88841593</guid><author>Mr_Slower</author><pubDate>Wed, 27 Mar 2019 12:23:51 +0800</pubDate><description><![CDATA[1.介绍
通过subprocess模块可以在python程序中开设一个子进程, 该子进程在shell中执行相关命令然后主进程可获取其运行结果
2.Popen对象
通过Popen可开启子进程, Popen为非阻塞的:

class subprocess.Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=N...]]></description><category></category></item><item><title><![CDATA[python关于logging模块]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/88838313</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/88838313</guid><author>Mr_Slower</author><pubDate>Wed, 27 Mar 2019 10:30:49 +0800</pubDate><description><![CDATA[1.内置模块logging主要用于自动方便的生成日志;
默认的日志级别设置为WARNING（日志级别等级CRITICAL &gt; ERROR &gt; WARNING &gt; INFO &gt; DEBUG &gt; NOTSET），默认的日志格式为日志级别：Logger名称：用户输出消息。
2.基本使用
import logging
logging.basicConfig(
    leve...]]></description><category></category></item><item><title><![CDATA[Nginx的Permission denied错误]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/88673810</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/88673810</guid><author>Mr_Slower</author><pubDate>Tue, 19 Mar 2019 21:22:53 +0800</pubDate><description><![CDATA[原因:
通过ps命令查看nginx进程为用户nginx，而uwsgi进程为用户root。估计是权限不一致导致nginx无法访问uwsgi进程（socket方式通信）。
所以修改nginx的配置文件/etc/nginx/nginx.conf，把user选项从nginx改成root。之后执行重启命令
systemctl restart nginx

如果还不行，那就是selinux，执行下面命令：
s...]]></description><category></category></item><item><title><![CDATA[Scrapy自定义proxy代理及https证书]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/88384586</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/88384586</guid><author>Mr_Slower</author><pubDate>Sun, 10 Mar 2019 21:43:53 +0800</pubDate><description><![CDATA[1.代理
方式一：使用默认
os.environ
{
http_proxy:http://root:woshiniba@192.168.11.11:9999/
https_proxy:http://192.168.11.11:9999/
}
方式二：使用自定义下载中间件
    def to_bytes(text, encoding=None, errors='strict'):
        ...]]></description><category></category></item><item><title><![CDATA[django关于ModelForm]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/86709847</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/86709847</guid><author>Mr_Slower</author><pubDate>Thu, 31 Jan 2019 12:10:22 +0800</pubDate><description><![CDATA[1.class ModelForm

If you’re building a database-driven app, chances are you’ll have forms that map closely to Django models. For instance, you might have a BlogComment model, and you want to create a...]]></description><category></category></item><item><title><![CDATA[django关于文件上传]]></title><link>https://blog.youkuaiyun.com/Mr_Slower/article/details/85175549</link><guid>https://blog.youkuaiyun.com/Mr_Slower/article/details/85175549</guid><author>Mr_Slower</author><pubDate>Sat, 22 Dec 2018 12:03:07 +0800</pubDate><description><![CDATA[1.简单示例:
from django import forms
class UploadFileForm(forms.Form):
title = forms.CharField(max_length=50)
file = forms.FileField()


A view handling this form will receive the file data in request.FIL...]]></description><category></category></item></channel></rss>