Skip to content

Commit

Permalink
更新了部分文档
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrued committed Dec 12, 2019
1 parent 4502900 commit d7c42bc
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 3 deletions.
98 changes: 97 additions & 1 deletion Day91-100/100.Python面试题集.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@

1. 说一说Python中的新式类和旧式类有什么区别。

答:

2. Python中`is`运算符和`==`运算符有什么区别?

答:请参考[《那些年我们踩过的那些坑》](../番外篇/那些年我们踩过的那些坑.md)

3. Python中如何动态设置和获取对象属性?

答:`setattr(object, name, value)``getattr(object, name[, default])`内置函数,其中`object`是对象,`name`是对象的属性名,`value`是属性值。这两个函数会调用对象的`__getattr__``__setattr__`魔术方法。

4. Python如何实现内存管理?有没有可能出现内存泄露的问题?

答:

5. 阐述列表和集合的底层实现原理。

答:

6. 现有字典`d = {'a': 24, 'g': 52, 'i': 12, 'k': 33}`,如何按字典中的值对字典进行排序得到排序后的字典。

答:
Expand Down Expand Up @@ -98,6 +108,12 @@

11. 写一个返回bool值的函数,判断给定的非负整数是不是回文数。

答:

```Python

```

12. 用一行代码实现求任意非负整数的阶乘。

答:
Expand All @@ -118,18 +134,56 @@

14. 删除列表中的重复元素并保留原有的顺序。

答:

```Python

```

15. 找出两个列表中的相同元素和不同元素。

答:

16. 列表中的某个元素出现次数占列表元素总数的半数以上,找出这个元素。

答:

```Python

```

17. 实现对有序列表进行二分查找的算法。

答:

```Python

```

18. 输入年月日,输出这一天是这一年的第几天。

答:

```Python

```

19. 统计一个字符串中各个字符出现的次数。

答:

```Python

```

20. 在Python中如何实现单例模式?

答:

```Python

```

21. 下面的代码会输出什么。

```Python
Expand All @@ -151,8 +205,20 @@

22. 实现一个记录函数执行时间的装饰器。

答:

```Python

```

23. 写一个遍历指定目录下指定后缀名的文件的函数。

答:

```Python

```

24. 有如下所示的字典,请将其转换为CSV格式。

转换前:
Expand Down Expand Up @@ -199,30 +265,60 @@

27. 正则表达式对象的`search``match`方法有什么区别?

答:

28. 当做个线程竞争一个对象且该对象并非线程安全的时候应该怎么办?

答:

29. 说一下死锁产生的条件以及如何避免死锁的发生。

答:

30. 请阐述TCP的优缺点。

答:

31. HTTP请求的GET和POST有什么区别?

答:

32. 说一些你知道的HTTP响应状态码。

答:

33. 简单阐述HTTPS的工作原理。

答:

34. 阐述Django项目中一个请求的生命周期。

答:

35. Django项目中实现数据接口时如何解决跨域问题。

答:

36. Django项目中如何对接Redis高速缓存服务。

答:

37. 请说明Cookie和Session之间的关系。

答:

38. 说一下索引的原理和作用。

答:

39. 是否使用过Nginx实现负载均衡?用过哪些负载均衡算法?

答:

40. 一个保存整数(int)的数组,除了一个元素出现过1次外,其他元素都出现过两次,请找出这个元素。

41. 有12个外观相同的篮球,其中1个的重要和其他11个的重量不同(有可能轻有可能重),现在有一个天平可以使用,怎样才能通过最少的称重次数找出这颗与众不同的球。
答:

41. 有12个外观相同的篮球,其中1个的重要和其他11个的重量不同(有可能轻有可能重),现在有一个天平可以使用,怎样才能通过最少的称重次数找出这颗与众不同的球。

答:
1 change: 1 addition & 0 deletions Day91-100/97.电商网站技术要点剖析.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ ElasticSearch的安装和配置可以参考[《ElasticSearch之Docker安装》](
- haystack(django-haystack / drf-haystack) + whoosh + Jieba
- haystack (django-haystack / drf-haystack)+ elasticsearch
- requests + elasticsearch
- django-elasticsearch-dsl

####安装和使用ElasticSearch

Expand Down
2 changes: 1 addition & 1 deletion Day91-100/99.面试中的公共问题.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

1. 开发中用过哪些标准库和三方库。

> 标准库:sys / os / re / math / random / logging / json / pickle / shelve / socket / datetime / hashlib / configparser / urllib / itertools / collections / functools / threading / multiprocess / timeit / atexit / abc / asyncio / base64 / concurrent.futures / copy / csv / operator / enum / heapq / http / profile / pstats / ssl / unitest / uuid
> 标准库:sys / os / re / math / random / logging / json / pickle / shelve / socket / datetime / hashlib / configparser / urllib / itertools / collections / functools / threading / multiprocess / timeit / atexit / abc / asyncio / base64 / concurrent.futures / copy / csv / operator / enum / heapq / http / profile / pstats / ssl / unittest / uuid
>
> 三方库:openpyxl / xlrd / xlwt / PyPDF2 / ReportLab / PyYAML / jieba / pillow / requests / urllib3 / responses / aiohttp / BeautifulSoup4 / lxml / pyquery / PyMySQL / psycopg2 / redis / PyMongo / Peewee / SQLAlchemy / alipay / PyJWT / itsdangerous / celery / flower / elasticsearch-dsl-py / PyCrypto / Paramiko / logbook / nose / pytest / coverage / Selenium / lineprofiler / memoryprofiler / matplotlib / pygal / OpenCV
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
python manage.py inspectdb > app/models.py
```

#### 第92天:[使用Docker部署应用](./Day91-100/92.使用Docker部署应用.md)
#### 第92天:[Docker容器详解](./Day91-100/92.Docker容器详解.md)

1. Docker简介
2. 安装Docker
Expand Down
Binary file modified res/python-qq-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit d7c42bc

Please sign in to comment.