自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 资源 (1)
  • 收藏
  • 关注

原创 docker设置多个环境变量

在命令行直接使用-e或–env,–env-file2.在dockerfile里设置这里键值是以空格分开的

2019-03-29 17:55:01 26992

原创 flask自动生成swagger的api接口文档

生成接口文档一直是一件麻烦的事,这里想自动化生成swagger的接口文档,所以用了一个框架:Flask-RESTPlus链接里有安装教程。结合yaml版本会更容易理解: yaml版本传送门本文依旧是以代码+效果图的方式表现:from flask_restplus import Api, Resource, fieldsapp = Flask(__name__) api = Api(...

2019-03-27 17:36:10 21563 2

原创 用swagger生成api的接口文档(yaml版)

swagger的文档可以用json和yaml写,这里我用的yaml写的,会以文档+效果图表现出来:swagger: "2.0" info: description: "this is a api for authenticating users and binding cloud accounts." version: "1.0.0" title: "Auth api" ho...

2019-03-27 16:29:38 53643 4

原创 python readwritelock读写锁的实现

1.场景: 现在要读取和写入s3上的文件,为避免读写不一致,须实现一个读写锁,要求如下: 写优先,如果有线程写入,读线程等待。2.实现方法:利用python自带的threading库中的threading.Condition()方法,再结合一个计数器。3. 代码及测试如下:import threadingclass MyReadWriteLock(object): ""...

2019-03-18 17:14:13 1464

算法导论_ver3.pdf

This section will lead readers to start thinking about the design and analysis of algorithms, briefly introducing the expression of algorithms, some of the design strategies to be used in this book, and many of the basic ideas used in algorithm analysis. The rest of this book is based on this basic knowledge.Chapter 1 is an overview of algorithms and their place in modern computing systems. This chapter gives the definition of algorithm and some examples of algorithm. In addition, this chapter demonstrates that algorithms are a technology, as are fast hardware, graphical user interfaces, object-oriented systems, and networks.In chapter 2, we present the first algorithms in the book, which solve the problem of sorting n Numbers. These algorithms are presented in a form of pseudocode that, although not directly translated into any regular programming language, expresses the structure of the algorithm clearly enough for any competent programmer to implement the algorithm in the language of his choice. The sorting algorithm we analyzed is insertion sort, which takes an incremental approach;It also analyzes merge sort, which USES a recursive technique called divide-and-conquer. Although the running time required by both algorithms increases with the value of n, the rate of increase is different. In chapter 2, we analyze the running time of these two algorithms and give a useful representation to express these running times.Chapter 3 gives an exact definition of this representation, called asymptotic representation. At the beginning of chapter 3, several asymptotic symbols are defined, which are mainly used to represent the upper and lower bounds of algorithm running time. The rest of chapter 3 mainly presents some mathematical representation methods. The purpose of this section is more to ensure that the reader's notation matches the book's notation system than to teach it

2019-04-12

空空如也

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

TA关注的人

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