1-素材库同步:将素材组的素材同步到oss

一、fork用法:

1、linux使用flock文件锁解决crontab冲突问题

2、Linux如何查看进程、杀死进程、启动进程等常用命令

二、fire.Fire() 用法:

1、python fire使用指南

2、【Python】自动生成命令行工具 - fire 简介

3、python的其他命令行工具:Python 中用于生成命令行接口(Command Line Interfaces, CLIs)的工具已经有一些了,例如已经成为 Python 标准库的 argparse 和第三方的 click

三、python log模块的用法:

1、文档:logging --- Python 的日志记录工具

2、Python之日志处理(logging模块)

四、python 类相关:

1、Python super() 函数

2、python中的cls到底指的是什么,与self有什么区别?

3、浅谈python中的实例方法self、类方法cls和静态方法

4、python中self和cls的区别

5、时间处理:

(1)dateparser 日期处理库 教程

>>> import dateparser
>>> dateparser . parse ( '12/12/12' )
datetime . datetime ( 2012 , 12 , 12 , 0 , 0 )

>>> parse ( '1 hour ago' )
datetime . datetime ( 2015 , 5 , 31 , 23 , 0 )

>>> parse ( u '2小时前' )    # Chinese (2 hours ago)
datetime . datetime ( 2015 , 5 , 31 , 22 , 0 )

(2)其他时间处理库: ???

6、python中yield的用法详解

7、Python yield 使用浅析

8、pysmb模块操作smb服务器:

(1)Python——操作smb文件服务器(上传和下载)

(2)SMBconnection类使用

9、python多线程和多进程:

(1)python线程池ThreadPoolExecutor与进程池ProcessPoolExecutor

(2)Python多进程解决方案multiprocessing ProcessPoolExecutor

(3)廖雪峰 - 进程和线程

10、Python zip() 函数

11、python中retry的用法

12、Python endswith()方法

13、python 排序函数:

(1)Python List sort()方法

(2)Python sorted() 函数

五、pip 命令:

1、 pip install -U fire:-U就是 --upgrade,意思是如果已安装就升级到最新版

2、其他pip 常见命令

3、 用requirements.txt 文件记录环境所有依赖包及其精确的版本号

(1)生成requirements.txt文件:pip freeze > requirements.txt

(2)安装requirements.txt依赖:pip install -r requirements.txt

六、python pyenv用法:

1、Python虚拟环境管理工具之pipenv

2、常见命令:

Commands:
  check      Checks for security vulnerabilities and against PEP 508 markers
             provided in Pipfile.
  clean      Uninstalls all packages not specified in Pipfile.lock.
  graph      Displays currently-installed dependency graph information.
  install    Installs provided packages and adds them to Pipfile, or (if no
             packages are given), installs all packages from Pipfile.
  lock       Generates Pipfile.lock.
  open       View a given module in your editor.
  run        Spawns a command installed into the virtualenv.
  shell      Spawns a shell within the virtualenv.
  sync       Installs all packages specified in Pipfile.lock.
  uninstall  Un-installs a provided package and removes it from Pipfile.
  update     Runs lock, then sync.

3、具体使用:如何生成 Pipfile.lock 、pipfile ??

七、redis:常见用法

1、redis的基本操作、用python链接redis的多种方法

2、python 连接redis的两种方法:

(1)直接连接:r = redis.Redis.from_url(redis_url)

(2)使用线程池:

import redis
pool = redis.ConnectionPool(host='192.168.11.122',password='123123',port=6379)
r = redis.Redis(connection_pool=pool)
r.set('name','Yu chao')

八、python 正则: 

1、廖雪峰-正则表达式

2、菜鸟教程-正则表达式

3、总结:

表达式类型 字符 含义
表示字符 d 1个数字
  w 1个数字或字母
  s 1个空格
  . 1个任意字符
  [ ] 1个在[ ]内的字符
  | 1个在|左右的字符
表示数量 * >=0个字符
  + >=1个
  0个或1个
  {n} N个
  {n, m} n个到m个
表示开头或结尾 ^ 开头
  $ 结尾
表示分组 () ()内的字符是一组 
 
 

 

原文地址:https://www.cnblogs.com/hailin2018/p/15054820.html