python questions

The first part of the Python Basics (80 questions)

  1. Why learn Python?

  2. By what way to learn Python?

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

  4. Brief interpreted and compiled programming language?

  5. Python interpreter type and characteristics?

  6. Bits and bytes of the relationship?

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

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

  9. 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

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

    The conversion rule is 10.3.9.12:
            10 00001010
    
         . 3 00000011

             . 9 00001001
    
        12 is 00001100

    or more spliced together and then calculates a decimal-binary results: 0,000,101,000,000,011 0,000,100,100,001,100 =?
  11. The maximum number of layers python recursion?

  12. 求结果:
        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
  13. ascii, unicode, utf-8, gbk difference?

  14. The difference between byte code and machine code?

  15. Ternary operator rules and scenarios?

  16. List of differences Python2 and Python3?

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

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

  19. Xrange and range of difference?

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

  21. Listed common Boolean value of False?

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

  23. lambda expressions formats and scenarios?

  24. pass effect?

  25. * Arg and ** kwarg role

  26. and is the difference between ==

  27. Brief Python and copy depth scenarios?

  28. Python garbage collection?

  29. Python variable type and immutable type?

  30. Seeking Results:
    
   V = dict.fromkeys ([ 'K1', 'K2'], [])
 
       . V [ 'K1'] the append (666)
    
   Print (V)

       V [ 'K1'] = 777
    
   Print (V)
  31. Seeking results:
  32. Common list of built-in functions?

  33. filter, map, reduce role?

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

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

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

  37. The difference between re search and match?

  38. What is a regular match greed?

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

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

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

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

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

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

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

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

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

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

  49. Please realize short answer stack in code.

  50. What kinds of commonly used string formatting?

  51. Brief generators, iterators, iterables and scenarios?

  52. Implement a binary function looks with Python.

  53. Talk about your understanding of the closures?

  54. The role of the os and sys modules?

  55. How to generate a random number?

  56. How to use python to delete a file?

  57. Talk about your understanding of object-oriented?

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

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

  60. Object-oriented super role?

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

  62. The method recited in particular with object-oriented underlined cool, such as: __ new __, __ init__

  63. How to determine a function or method?

  64. Static methods and class methods difference?

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

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

  67. What is reflection? And application scenarios?

  68. metaclass role? And application scenarios?

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

  70. Writing and application scenarios decorator.

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

  72. What is object-oriented mro

  73. isinstance role and application scenarios?

  74. 写代码并实现:
    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]
  75. When json serialized data type can handle what? How to customize support datetime type?

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

  77. What is asserted? Scenarios?

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

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

  80. Description of yield and yield from keywords.

Concurrent programming network and a second portion (34 questions)

  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 of the database and caching (46 questions)

  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)
    see Wu Pei Qibo off: https: //www.cnblogs.com/wupeiqi/articles/5729934.html

  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 of the front end, the frame and the other (155 items)

    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:

    19. Figure write results:

    20. Figure write results:

    21. Figure write results:
       

    22. Figure write results:

    23. Figure write results:

    24. Compare django, flask, tornado framework?

    25. What is wsgi?

    26. Lifecycle django request?

    27. 列举django的内置组件?

    28. 列举django中间件的5个方法?以及django中间件的应用场景?

    29. 简述什么是FBV和CBV?

    30. django的request对象是在什么时候创建的?

    31. 如何给CBV的程序添加装饰器?

    32. 列举django orm 中所有的方法(QuerySet对象的所有方法)

    33. only和defer的区别?

    34. select_related和prefetch_related的区别?

    35. filter和exclude的区别?

    36. 列举django orm中三种能写sql语句的方法。

    37. django orm 中如何设置读写分离?

    38. F和Q的作用?

    39. values和values_list的区别?

    40. 如何使用django orm批量创建数据?

    41. django的Form和ModeForm的作用?

    42. django的Form组件中,如果字段中包含choices参数,请使用两种方式实现数据源实时更新。

    43. django的Model中的ForeignKey字段中的on_delete参数有什么作用?

    44. django中csrf的实现机制?

    45. django如何实现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的字段是否正确?如果不正确请更正:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      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())
    87. SQLAchemy中如何为表设置引擎和字符编码?

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

    89. 简述Tornado框架的特点。

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

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

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

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

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

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

    96. git常见命令作用:

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

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

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

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

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

    102. 什么是gitlab?

    103. github和gitlab的区别?

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

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

    106. 什么是敏捷开发?

    107. 简述 jenkins 工具的作用?

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

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

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

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

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

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

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

    115. 简述celery运行机制。

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

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

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

    119. 简述 requests模块的作用及基本使用?

    120. 简述 beautifulsoup模块的作用及基本使用?

    121. 简述 seleninu模块的作用及基本使用?

    122. scrapy框架中各组件的工作流程?

    123. 在scrapy框架中如何设置代理(两种方法)?

    124. scrapy框架中如何实现大文件的下载?

    125. scrapy中如何实现限速?

    126. scrapy中如何实现暂定爬虫?

    127. scrapy中如何进行自定制命令?

    128. scrapy中如何实现的记录爬虫的深度?

    129. scrapy中的pipelines工作原理?

    130. scrapy的pipelines如何丢弃一个item对象?

    131. 简述scrapy中爬虫中间件和下载中间件的作用?

    132. scrapy-redis组件的作用?

    133. scrapy-redis组件中如何实现的任务的去重?

    134. scrapy-redis的调度器如何实现任务的深度优先和广度优先?

    135. 简述 vitualenv 及应用场景?

    136. 简述 pipreqs 及应用场景?

    137. 在Python中使用过什么代码检查工具?

    138. 简述 saltstack、ansible、fabric、puppet工具的作用?

    139. B Tree和B+ Tree的区别?

    140. 请列举常见排序并通过代码实现任意三种。

    141. 请列举常见查找并通过代码实现任意三种。

    142. 请列举你熟悉的设计模式?

    143. 有没有刷过leetcode?

    144. 列举熟悉的的Linux命令。

    145. 公司线上服务器是什么系统?

    146. 解释 PV、UV 的含义?

    147. 解释 QPS的含义?

    148. uwsgi和wsgi的区别?

    149. supervisor的作用?

    150. 什么是反向代理?

    151. 简述SSH的整个过程。

    152. 有问题都去那些找解决方案?

    153. 是否有关注什么技术类的公众号?

    154. 最近在研究什么新技术?

    155. 是否了解过领域驱动模型?

Guess you like

Origin www.cnblogs.com/jiangchunsheng/p/11271614.html