The first part of the Python Basics (80 questions)
-
Why learn Python?
-
By what way to learn Python?
-
Compared to other languages Python and Java, PHP, C, C #, C ++, etc.?
-
Brief interpreted and compiled programming language?
-
Python interpreter type and characteristics?
-
Bits and bytes of the relationship?
-
b, B, KB, MB, GB relationship?
-
Please include at least 5 PEP8 specification (the more the better).
- 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 -
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 =? -
The maximum number of layers python recursion?
- 求结果:
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 -
ascii, unicode, utf-8, gbk difference?
-
The difference between byte code and machine code?
-
Ternary operator rules and scenarios?
-
List of differences Python2 and Python3?
-
Value exchange achieved by line of code:
A. 1 =
B 2 = -
Python3 difference between int and long and Python2 in?
-
Xrange and range of difference?
-
When file operations: xreadlines and readlines the difference?
-
Listed common Boolean value of False?
-
Strings, lists, tuples, dictionaries each of five commonly used method?
-
lambda expressions formats and scenarios?
-
pass effect?
-
* Arg and ** kwarg role
-
and is the difference between ==
-
Brief Python and copy depth scenarios?
-
Python garbage collection?
-
Python variable type and immutable type?
- Seeking Results:
V = dict.fromkeys ([ 'K1', 'K2'], [])
. V [ 'K1'] the append (666)
Print (V)
V [ 'K1'] = 777
Print (V) - Seeking results:
-
Common list of built-in functions?
-
filter, map, reduce role?
-
Line of code to achieve 9 * 9 multiplication table
-
How to install third-party modules? And which third-party modules used?
-
At least eight listed are those commonly used modules?
-
The difference between re search and match?
-
What is a regular match greed?
-
求结果: a. [ i % 2 for i in range(10) ] b. ( i % 2 for i in range(10) )
-
Results seeking: a 1 or 2 b 1 and 2 c 1 <(2 == 2) d 1 <2 == 2....
-
def func (a, b = []) The wording What pit?
-
How to achieve "1,2,3" into [ '1', '2', '3']?
-
How to achieve [ '1', '2', '3'] become [1,2,3]?
-
Comparison: a = [1,2,3] and b = [(1), (2), (3)] and b = [(1,), (2,), (3,)] of the difference?
-
How to generate one line of code [1,4,9,16,25,36,49,64,81,100]?
-
A line of code to achieve the deletion list duplicate values?
-
How to set a global variable in a function?
-
The role of logging module? And application scenarios?
-
Please realize short answer stack in code.
-
What kinds of commonly used string formatting?
-
Brief generators, iterators, iterables and scenarios?
-
Implement a binary function looks with Python.
-
Talk about your understanding of the closures?
-
The role of the os and sys modules?
-
How to generate a random number?
-
How to use python to delete a file?
-
Talk about your understanding of object-oriented?
-
Python object-oriented inheritance What are the characteristics?
-
What is object-oriented depth-first and breadth-first that?
-
Object-oriented super role?
-
Whether used in a function functools? what is the function?
-
The method recited in particular with object-oriented underlined cool, such as: __ new __, __ init__
-
How to determine a function or method?
-
Static methods and class methods difference?
-
Object-oriented cited in particular the members and scenarios
-
How many other with no repeat of three digits can be composed of 1,2,3,4,5
-
What is reflection? And application scenarios?
-
metaclass role? And application scenarios?
-
Single-mode embodiment of the method of using as much.
-
Writing and application scenarios decorator.
-
Exception handling and how the wording of the initiative ran abnormal (scenarios)
-
What is object-oriented mro
-
isinstance role and application scenarios?
- 写代码并实现:
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] -
When json serialized data type can handle what? How to customize support datetime type?
-
When json serialization, default encountered Chinese will be converted into unicode, how to do if you want to keep Chinese?
-
What is asserted? Scenarios?
-
I have used it with statement? What is it good for?
-
Use code that implements all of the files listed under directory view.
-
Description of yield and yield from keywords.
Concurrent programming network and a second portion (34 questions)
-
Brief OSI seven layer protocol.
-
What is the C / S and B / S architecture?
-
Brief three-way handshake, four wave processes.
-
What is arp protocol?
-
TCP and UDP difference?
-
What is the local area network and wide area network?
-
Why tcp protocol-based communication more reliable communication protocol based on udp ratio?
-
What is a socket? DESCRIPTION socket-based communication protocol process tcp.
-
What is the stick package? What are the reasons socket caused stick package is? Stick package which case the phenomenon occur?
-
IO multiplexing role?
-
What is a firewall and the role?
-
select, difference poll, epoll model?
-
Description of processes, threads, coroutines, and the difference scenarios?
-
GIL lock What the hell?
-
Python how to use the thread pool and process pool?
-
The role of threading.local?
-
How to communicate between processes?
-
What is concurrency and parallelism?
-
The role of process and thread lock lock?
-
Explain what is asynchronous non-blocking?
-
The difference between routers and switches?
-
What is DNS?
-
How to modify the local hosts file?
-
Producer consumer model scenarios and advantages?
-
What is cdn?
-
LVS is and what role?
-
Nginx is and what role?
-
keepalived and what is the role?
-
haproxy is and what role?
-
What is load balancing?
-
What is rpc and application scenarios?
-
Functions and Application scenario outlined asynio module.
-
DESCRIPTION gevent module function and application scenarios.
-
Use and application of twisted frame?
The third part of the database and caching (46 questions)
-
Listed common relational and non-relational databases have those?
-
MySQL database engine and Common compare?
-
Brief data three paradigms?
-
What is a transaction? How MySQL support transactions?
-
Description of the database design and many-to-many application scenarios?
-
How to store counter commodity based database?
-
Common SQL (necessary)
see Wu Pei Qibo off: https: //www.cnblogs.com/wupeiqi/articles/5729934.html -
Brief triggers, functions, views, stored procedures?
-
MySQL index species
-
Index follow the rules of the most left-prefix under what circumstances?
-
The difference between primary and foreign keys?
-
MySQL common function?
-
Creating index lists eight situations but can not hit the index.
-
How do I turn slow query log?
-
Database import and export commands (structure + data)?
-
Database optimization?
-
char and varchar difference?
-
Brief MySQL implementation plan?
-
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 -
1000w pieces of data, the use of limit offset page, why the slow climb back? How to solve?
-
What is the index of the merger?
-
What is covered by the index?
-
Description of the database separate read and write?
-
Description of the database sub-library sub-table? (Horizontal and vertical)
-
Compare redis and memcached?
-
redis database db default number and role?
-
python redis module operation?
-
If the amount of data redis in a list is very large, if the implementation cycle through each value?
-
How redis Master-slave replication? And a data synchronization mechanism?
-
Redis role of sentinel of?
-
How to achieve redis clusters?
-
redis default number of hash slots?
-
Brief redis, which has several persistence strategies and compare?
-
Redis listed expiration policy support.
-
There 2000w MySQL data, only the data stored in redis 20w, how to ensure the redis are hot data?
-
Write code that implements FIFO based on the list of redis, LIFO queue, priority queue.
-
How to achieve redis based message queue?
-
How to achieve redis based publish and subscribe? As well as publish and subscribe message queue difference?
-
What is codis and effect?
-
What is twemproxy and effect?
-
Write code that implements redis transaction operations.
-
Redis role in the command of the watch?
-
Based on how to achieve mall merchandise redis number of counters?
-
Brief redis distributed lock mechanism and implementation of redlock.
-
What is consistent hashing? Is there a corresponding module in Python?
-
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)
-
Talk about your understanding of the http protocol.
-
Talk about your understanding of websocket agreement.
-
What is the magic string?
-
How to create a responsive layout?
-
What you've ever used front-end framework?
-
What is ajax request? And use the XMLHttpRequest object and implement a jQuery ajax request.
-
How to achieve in rotation in the front?
-
How long in rotation in the front?
-
vuex role?
-
The role of interceptor route vue in?
-
axios role?
-
Vue list of common commands.
-
Brief jsonp and realization of the principle?
-
What cors?
-
Http request lists common request way?
-
Http request list status code?
-
Http request lists common request header?
-
Figure write results:
-
Figure write results:
-
Figure write results:
-
Figure write results:
-
Figure write results:
-
Figure write results:
-
Compare django, flask, tornado framework?
-
What is wsgi?
-
Lifecycle django request?
-
列举django的内置组件?
-
列举django中间件的5个方法?以及django中间件的应用场景?
-
简述什么是FBV和CBV?
-
django的request对象是在什么时候创建的?
-
如何给CBV的程序添加装饰器?
-
列举django orm 中所有的方法(QuerySet对象的所有方法)
-
only和defer的区别?
-
select_related和prefetch_related的区别?
-
filter和exclude的区别?
-
列举django orm中三种能写sql语句的方法。
-
django orm 中如何设置读写分离?
-
F和Q的作用?
-
values和values_list的区别?
-
如何使用django orm批量创建数据?
-
django的Form和ModeForm的作用?
-
django的Form组件中,如果字段中包含choices参数,请使用两种方式实现数据源实时更新。
-
django的Model中的ForeignKey字段中的on_delete参数有什么作用?
-
django中csrf的实现机制?
-
django如何实现websocket?
-
基于django使用ajax发送post请求时,都可以使用哪种方法携带csrf token?
-
django中如何实现orm表中添加数据时创建一条日志记录。
-
django缓存如何设置?
-
django的缓存能使用redis吗?如果可以的话,如何配置?
-
django路由系统中name的作用?
-
django的模板中filter和simple_tag的区别?
-
django-debug-toolbar的作用?
-
django中如何实现单元测试?
-
解释orm中 db first 和 code first的含义?
-
django中如何根据数据库表生成model中的类?
-
使用orm和原生sql的优缺点?
-
简述MVC和MTV
-
django的contenttype组件的作用?
-
谈谈你对restfull 规范的认识?
-
接口的幂等性是什么意思?
-
什么是RPC?
-
Http和Https的区别?
-
为什么要使用django rest framework框架?
-
django rest framework框架中都有那些组件?
-
django rest framework框架中的视图都可以继承哪些类?
-
简述 django rest framework框架的认证流程。
-
django rest framework如何实现的用户访问频率控制?
-
Flask框架的优势?
-
Flask框架依赖组件?
-
Flask蓝图的作用?
-
列举使用过的Flask第三方组件?
-
简述Flask上下文管理流程?
-
Flask中的g的作用?
-
Flask中上下文管理主要涉及到了那些相关的类?并描述类主要作用?
-
为什么要Flask把Local对象中的的值stack 维护成一个列表?
-
Flask中多app应用是怎么完成?
-
在Flask中实现WebSocket需要什么组件?
-
wtforms组件的作用?
-
Flask框架默认session处理机制?
-
解释Flask框架中的Local对象和threading.local对象的区别?
-
Flask中 blinker 是什么?
-
SQLAlchemy中的 session和scoped_session 的区别?
-
SQLAlchemy如何执行原生SQL?
-
ORM的实现原理?
-
DBUtils模块的作用?
- 以下SQLAlchemy的字段是否正确?如果不正确请更正:
1234567891011from
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())
-
SQLAchemy中如何为表设置引擎和字符编码?
-
SQLAchemy中如何设置联合唯一索引?
-
简述Tornado框架的特点。
-
简述Tornado框架中Future对象的作用?
-
Tornado框架中如何编写WebSocket程序?
-
Tornado中静态文件是如何处理的? 如: <link href="{{static_url("commons.css")}}" rel="stylesheet" />
-
Tornado操作MySQL使用的模块?
-
Tornado操作redis使用的模块?
-
简述Tornado框架的适用场景?
-
git常见命令作用:
-
简述以下git中stash命令作用以及相关其他命令。
-
git 中 merge 和 rebase命令 的区别。
-
公司如何基于git做的协同开发?
-
如何基于git实现代码review?
-
git如何实现v1.0 、v2.0 等版本的管理?
-
什么是gitlab?
-
github和gitlab的区别?
-
如何为github上牛逼的开源项目贡献代码?
-
git中 .gitignore文件的作用?
-
什么是敏捷开发?
-
简述 jenkins 工具的作用?
-
公司如何实现代码发布?
-
简述 RabbitMQ、Kafka、ZeroMQ的区别?
-
RabbitMQ如何在消费者获取任务后未处理完前就挂掉时,保证数据不丢失?
-
RabbitMQ如何对消息做持久化?
-
RabbitMQ如何控制消息被消费的顺序?
-
以下RabbitMQ的exchange type分别代表什么意思?如:fanout、direct、topic。
-
简述 celery 是什么以及应用场景?
-
简述celery运行机制。
-
celery如何实现定时任务?
-
简述 celery多任务结构目录?
-
celery中装饰器 @app.task 和 @shared_task的区别?
-
简述 requests模块的作用及基本使用?
-
简述 beautifulsoup模块的作用及基本使用?
-
简述 seleninu模块的作用及基本使用?
-
scrapy框架中各组件的工作流程?
-
在scrapy框架中如何设置代理(两种方法)?
-
scrapy框架中如何实现大文件的下载?
-
scrapy中如何实现限速?
-
scrapy中如何实现暂定爬虫?
-
scrapy中如何进行自定制命令?
-
scrapy中如何实现的记录爬虫的深度?
-
scrapy中的pipelines工作原理?
-
scrapy的pipelines如何丢弃一个item对象?
-
简述scrapy中爬虫中间件和下载中间件的作用?
-
scrapy-redis组件的作用?
-
scrapy-redis组件中如何实现的任务的去重?
-
scrapy-redis的调度器如何实现任务的深度优先和广度优先?
-
简述 vitualenv 及应用场景?
-
简述 pipreqs 及应用场景?
-
在Python中使用过什么代码检查工具?
-
简述 saltstack、ansible、fabric、puppet工具的作用?
-
B Tree和B+ Tree的区别?
-
请列举常见排序并通过代码实现任意三种。
-
请列举常见查找并通过代码实现任意三种。
-
请列举你熟悉的设计模式?
-
有没有刷过leetcode?
-
列举熟悉的的Linux命令。
-
公司线上服务器是什么系统?
-
解释 PV、UV 的含义?
-
解释 QPS的含义?
-
uwsgi和wsgi的区别?
-
supervisor的作用?
-
什么是反向代理?
-
简述SSH的整个过程。
-
有问题都去那些找解决方案?
-
是否有关注什么技术类的公众号?
-
最近在研究什么新技术?
-
是否了解过领域驱动模型?