Common questions surface 315 Python

The first part, Python Basics

  1. Why learn Python?

    1. By what way to learn Python?

    2. Compared to other languages ​​Python and Java, PHP, C, C #, C ++, etc.?

    3. Brief interpreted and compiled programming language?

    4. Python interpreter type and characteristics?

    5. Bits and bytes of the relationship?

    6. b, B, KB, MB, GB relationship?

    7. Please include at least 5 PEP8 specification (the more the better).

    8. Conversion achieved by the following codes:

      Binary conversion to decimal: v = "0b1111011"
      decimal to binary: v = 18
      octal, decimal conversion: v = "011"
      Decimal to octal: v = 30
      hex conversion to decimal: v = "0x12"
      Decimal converted to hexadecimal: v = 87

    9. Please write a function to convert IP addresses to achieve an integer.

      As 10.3.9.12 conversion rules:

      ​        10            00001010
      
               3            00000011
      
      ​         9            00001001
      
              12            00001100

    And then stitching together more than binary decimal calculation results: 0,000,101,000,000,011 0,000,100,100,001,100 =?

    1. The maximum number of layers python recursion?

    2. Seeking results:
            v1 = 1 or 3
            v2 = 1 and 3
            v3 = 0 and 2 and 1
            v4 = 0 and 2 or 1
            v5 = 0 and 2 or 1 or 4
            v6 = 0 or Flase and 1
    1. ascii, unicode, utf-8, gbk difference?

    2. The difference between byte code and machine code?

    3. Ternary operator rules and scenarios?

    4. List of differences Python2 and Python3?

    5. Value exchange achieved by line of code:
      A. 1 =
      B 2 =

    6. Python3 difference between int and long and Python2 in?

    7. Xrange and range of difference?

    8. When file operations: xreadlines and readlines the difference?

    9. Listed common Boolean value of False?

    10. Strings, lists, tuples, dictionaries each of five commonly used method?

    11. lambda expressions formats and scenarios?

    12. pass effect?

    13. * Arg and ** kwarg role

    14. and is the difference between ==

    15. Brief Python and copy depth scenarios?

    16. Python garbage collection?

    17. Python variable type and immutable type?

    18. Seeking results:
           v = dict.fromkeys(['k1','k2'],[]) 
           v[‘k1’].append(666)
           print(v)
           v[‘k1’] = 777
           print(v)
    1. Seeking results:
      img

    2. Common list of built-in functions?

    3. filter, map, reduce role?

    4. Line of code to achieve 9 * 9 multiplication table

    5. How to install third-party modules? And which third-party modules used?

    6. At least eight listed are those commonly used modules?

    7. The difference between re search and match?

    8. What is a regular match greed?

    9. 求结果: a. [ i % 2 for i in range(10) ] b. ( i % 2 for i in range(10) )

    10. Results seeking: a 1 or 2 b 1 and 2 c 1 <(2 == 2) d 1 <2 == 2....

    11. def func (a, b = []) The wording What pit?

    12. How to achieve "1,2,3" into [ '1', '2', '3']?

    13. How to achieve [ '1', '2', '3'] become [1,2,3]?

    14. Comparison: a = [1,2,3] and b = [(1), (2), (3)] and b = [(1,), (2,), (3,)] of the difference?

    15. How to generate one line of code [1,4,9,16,25,36,49,64,81,100]?

    16. A line of code to achieve the deletion list duplicate values?

    17. How to set a global variable in a function?

    18. The role of logging module? And application scenarios?

    19. Please realize short answer stack in code.

    20. What kinds of commonly used string formatting?

    21. Brief generators, iterators, iterables and scenarios?

    22. Implement a binary function looks with Python.

    23. Talk about your understanding of the closures?

    24. The role of the os and sys modules?

    25. How to generate a random number?

    26. How to use python to delete a file?

    27. Talk about your understanding of object-oriented?

    28. Python object-oriented inheritance What are the characteristics?

    29. What is object-oriented depth-first and breadth-first that?

    30. Object-oriented super role?

    31. Whether used in a function functools? what is the function?

    32. The method recited in particular with object-oriented underlined cool, such as: new new , the init

    33. How to determine a function or method?

    34. Static methods and class methods difference?

    35. Object-oriented cited in particular the members and scenarios

    36. How many other with no repeat of three digits can be composed of 1,2,3,4,5

    37. What is reflection? And application scenarios?

    38. metaclass role? And application scenarios?

    39. Single-mode embodiment of the method of using as much.

    40. Writing and application scenarios decorator.

    41. Exception handling and how the wording of the initiative ran abnormal (scenarios)

    42. What is object-oriented mro

    43. isinstance role and application scenarios?

    44. Write code and implement:
        Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would 
        have exactly one solution, and you may not use the same element twice.
        Example:
                  Given nums = [2, 7, 11, 15], target = 9,
                   Because nums[0] + nums[1] = 2 + 7 = 9,
                   return [0, 1]
    1. When json serialized data type can handle what? How to customize support datetime type?

    2. When json serialization, default encountered Chinese will be converted into unicode, how to do if you want to keep Chinese?

    3. What is asserted? Scenarios?

    4. I have used it with statement? What is it good for?

    5. Use code that implements all of the files listed under directory view.

    6. Description of yield and yield from keywords.

A second portion, and concurrent programming network

    1. Brief OSI seven layer protocol.
    2. What is the C / S and B / S architecture?
    3. Brief three-way handshake, four wave processes.
    4. What is arp protocol?
    5. TCP and UDP difference?
    6. What is the local area network and wide area network?
    7. Why tcp protocol-based communication more reliable communication protocol based on udp ratio?
    8. What is a socket? DESCRIPTION socket-based communication protocol process tcp.
    9. What is the stick package? What are the reasons socket caused stick package is? Stick package which case the phenomenon occur?
    10. IO multiplexing role?
    11. What is a firewall and the role?
    12. select, difference poll, epoll model?
    13. Description of processes, threads, coroutines, and the difference scenarios?
    14. GIL lock What the hell?
    15. Python how to use the thread pool and process pool?
    16. The role of threading.local?
    17. How to communicate between processes?
    18. What is concurrency and parallelism?
    19. The role of process and thread lock lock?
    20. Explain what is asynchronous non-blocking?
    21. The difference between routers and switches?
    22. What is DNS?
    23. How to modify the local hosts file?
    24. Producer consumer model scenarios and advantages?
    25. What is cdn?
    26. LVS is and what role?
    27. Nginx is and what role?
    28. keepalived and what is the role?
    29. haproxy is and what role?
    30. What is load balancing?
    31. What is rpc and application scenarios?
    32. Functions and Application scenario outlined asynio module.
    33. DESCRIPTION gevent module function and application scenarios.
    34. Use and application of twisted frame?

The third part, database and cache

  1. Listed common relational and non-relational databases have those?
  2. MySQL database engine and Common compare?
  3. Brief data three paradigms?
  4. What is a transaction? How MySQL support transactions?
  5. Description of the database design and many-to-many application scenarios?
  6. How to store counter commodity based database?
  7. Common SQL (necessary)

  8. Brief triggers, functions, views, stored procedures?
  9. MySQL index species
  10. Index follow the rules of the most left-prefix under what circumstances?
  11. The difference between primary and foreign keys?
  12. MySQL common function?
  13. Creating index lists eight situations but can not hit the index.
  14. How do I turn slow query log?
  15. Database import and export commands (structure + data)?
  16. Database optimization?
  17. char and varchar difference?
  18. Brief MySQL implementation plan?
  19. In a unique index for the name made the premise, the following differences DESCRIPTION:
    SELECT * from TB WHERE name = 'Oldboy-Wupeiqi'
    SELECT * from TB WHERE name = 'Oldboy-Wupeiqi' limit. 1
  20. 1000w pieces of data, the use of limit offset page, why the slow climb back? How to solve?
  21. What is the index of the merger?
  22. What is covered by the index?
  23. Description of the database separate read and write?
  24. Description of the database sub-library sub-table? (Horizontal and vertical)
  25. Compare redis and memcached?
  26. redis database db default number and role?
  27. python redis module operation?
  28. If the amount of data redis in a list is very large, if the implementation cycle through each value?
  29. How redis Master-slave replication? And a data synchronization mechanism?
  30. Redis role of sentinel of?
  31. How to achieve redis clusters?
  32. redis default number of hash slots?
  33. Brief redis, which has several persistence strategies and compare?
  34. Redis listed expiration policy support.
  35. There 2000w MySQL data, only the data stored in redis 20w, how to ensure the redis are hot data?
  36. Write code that implements FIFO based on the list of redis, LIFO queue, priority queue.
  37. How to achieve redis based message queue?
  38. How to achieve redis based publish and subscribe? As well as publish and subscribe message queue difference?
  39. What is codis and effect?
  40. What is twemproxy and effect?
  41. Write code that implements redis transaction operations.
  42. Redis role in the command of the watch?
  43. Based on how to achieve mall merchandise redis number of counters?
  44. Brief redis distributed lock mechanism and implementation of redlock.
  45. What is consistent hashing? Is there a corresponding module in Python?
  46. How to efficiently find the key to all redis oldboy beginning?

The fourth part, the front end, and the other frame

    1. Talk about your understanding of the http protocol.

    2. Talk about your understanding of websocket agreement.

    3. What is the magic string?

    4. How to create a responsive layout?

    5. What you've ever used front-end framework?

    6. What is ajax request? And use the XMLHttpRequest object and implement a jQuery ajax request.

    7. How to achieve in rotation in the front?

    8. How long in rotation in the front?

    9. vuex role?

    10. The role of interceptor route vue in?

    11. axios role?

    12. Vue list of common commands.

    13. Brief jsonp and realization of the principle?

    14. What cors?

    15. Http request lists common request way?

    16. Http request list status code?

    17. Http request lists common request header?

    18. Figure write results:
      img

    19. Figure write results:
      img

    20. Figure write results:
      img

    21. Figure write results:
      img

    22. Figure write results:
      img

    23. Figure write results:
      img

    24. Compare django, flask, tornado framework?

    25. What is wsgi?

    26. Lifecycle django request?

    27. Django list of built-in components?

    28. Lists five methods django middleware? Django middleware and application scenarios?

    29. Description of what is FBV and CBV?

    30. django request object is created at what time?

    31. How to add a decorator to CBV program?

    32. Django orm include all of the methods (method QuerySet all objects)

    33. And defer the only difference?

    34. Select_related and prefetch_related the difference?

    35. The difference between the filter and exclude?

    36. Three methods listed django orm can write sql statement.

    37. django orm how to set up separate read and write?

    38. The role of F and Q?

    39. The difference between values ​​and values_list?

    40. How to create data using django orm batch?

    41. Django Form and the role of the ModeForm?

    42. Form django of assembly, if the field contains the parameter choices, use two ways updated in real time data source.

    43. on_delete parameters of Model django ForeignKey field in what role?

    44. django in csrf implementation mechanism?

    45. How django achieve websocket?

    46. 基于django使用ajax发送post请求时,都可以使用哪种方法携带csrf token?

    47. django中如何实现orm表中添加数据时创建一条日志记录。

    48. django缓存如何设置?

    49. django的缓存能使用redis吗?如果可以的话,如何配置?

    50. django路由系统中name的作用?

    51. django的模板中filter和simple_tag的区别?

    52. django-debug-toolbar的作用?

    53. django中如何实现单元测试?

    54. 解释orm中 db first 和 code first的含义?

    55. django中如何根据数据库表生成model中的类?

    56. 使用orm和原生sql的优缺点?

    57. 简述MVC和MTV

    58. django的contenttype组件的作用?

    59. 谈谈你对restfull 规范的认识?

    60. 接口的幂等性是什么意思?

    61. 什么是RPC?

    62. Http和Https的区别?

    63. 为什么要使用django rest framework框架?

    64. django rest framework框架中都有那些组件?

    65. django rest framework框架中的视图都可以继承哪些类?

    66. 简述 django rest framework框架的认证流程。

    67. django rest framework如何实现的用户访问频率控制?

    68. Flask框架的优势?

    69. Flask框架依赖组件?

    70. Flask蓝图的作用?

    71. 列举使用过的Flask第三方组件?

    72. 简述Flask上下文管理流程?

    73. Flask中的g的作用?

    74. Flask中上下文管理主要涉及到了那些相关的类?并描述类主要作用?

    75. 为什么要Flask把Local对象中的的值stack 维护成一个列表?

    76. Flask中多app应用是怎么完成?

    77. 在Flask中实现WebSocket需要什么组件?

    78. wtforms组件的作用?

    79. Flask框架默认session处理机制?

    80. 解释Flask框架中的Local对象和threading.local对象的区别?

    81. Flask中 blinker 是什么?

    82. SQLAlchemy中的 session和scoped_session 的区别?

    83. SQLAlchemy如何执行原生SQL?

    84. ORM的实现原理?

    85. DBUtils模块的作用?

    86. 以下SQLAlchemy的字段是否正确?如果不正确请更正:

from datetime import datetime
from sqlalchemy.ext.declarative
import declarative_base
from sqlalchemy import Column, Integer, String, DateTime

Base = declarative_base()
class UserInfo(Base):   
    __tablename__ = 'userinfo'   
    id = Column(Integer, primary_key=True, autoincrement=True)
    name = Column(String(64), unique=True)
    ctime = Column(DateTime, default=datetime.now())
  1. SQLAchemy中如何为表设置引擎和字符编码?

  2. SQLAchemy中如何设置联合唯一索引?

  3. 简述Tornado框架的特点。

  4. 简述Tornado框架中Future对象的作用?

  5. Tornado框架中如何编写WebSocket程序?

  6. Tornado中静态文件是如何处理的?如: <link href="{{static_url("commons.css")}}" rel="stylesheet" />

  7. Tornado操作MySQL使用的模块?

  8. Tornado操作redis使用的模块?

  9. 简述Tornado框架的适用场景?

  10. git常见命令作用:

  11. 简述以下git中stash命令作用以及相关其他命令。

  12. git 中 merge 和 rebase命令 的区别。

  13. 公司如何基于git做的协同开发?

  14. 如何基于git实现代码review?

  15. git如何实现v1.0 、v2.0 等版本的管理?

  16. 什么是gitlab?

  17. github和gitlab的区别?

  18. 如何为github上牛逼的开源项目贡献代码?

  19. git中 .gitignore文件的作用?

  20. 什么是敏捷开发?

  21. 简述 jenkins 工具的作用?

  22. 公司如何实现代码发布?

  23. 简述 RabbitMQ、Kafka、ZeroMQ的区别?

  24. RabbitMQ如何在消费者获取任务后未处理完前就挂掉时,保证数据不丢失?

  25. RabbitMQ如何对消息做持久化?

  26. RabbitMQ如何控制消息被消费的顺序?

  27. 以下RabbitMQ的exchange type分别代表什么意思?如:fanout、direct、topic。

  28. 简述 celery 是什么以及应用场景?

  29. 简述celery运行机制。

  30. celery如何实现定时任务?

  31. 简述 celery多任务结构目录?

  32. celery中装饰器 @app.task 和 @shared_task的区别?

  33. Function of the requests and the basic module to use?

  34. Function of the beautifulsoup module and basic use?

  35. Function of the seleninu module and basic use?

  36. scrapy framework of the various components of the workflow?

  37. How to set up a proxy (two ways) in scrapy framework?

  38. scrapy framework how to download large files?

  39. scrapy how to achieve the speed limit?

  40. scrapy how to achieve provisional reptiles?

  41. How scrapy be customized for commands?

  42. scrapy how to achieve a record depth of reptiles?

  43. pipelines in the works scrapy?

  44. How scrapy of pipelines discard an item objects?

  45. Brief scrapy role in reptiles and download middleware middleware?

  46. Role scrapy-redis components?

  47. Deduplication scrapy-redis component of how to achieve the task?

  48. How scrapy-redis task scheduler to achieve the depth-first and breadth-first?

  49. Brief vitualenv and application scenarios?

  50. Brief pipreqs and application scenarios?

  51. What code checking tool used in Python?

  52. Brief saltstack, ansible, fabric, the role of puppet tools?

  53. B Tree and B + Tree of difference?

  54. Please list any of the three common sequencing and implemented through the code.

  55. Please list any of the three common look and realized through the code.

  56. Please list your familiar design patterns?

  57. There is no brush leetcode?

  58. He cited the familiar Linux command.

  59. What is the company's online server system?

  60. Explanation PV, UV meaning?

  61. QPS explain the meaning of?

  62. uwsgi and wsgi difference?

  63. supervisor role?

  64. What is a reverse proxy?

  65. The whole process is outlined SSH.

  66. There are problems to find those solutions?

  67. Is there a focus on what kind of technology the public number?

  68. Recent research in new technology?

  69. Whether to find out about the field-driven model?

Guess you like

Origin www.cnblogs.com/xxpythonxx/p/11366293.html