- Python for Secret Agents
- Steven F. Lott
- 246字
- 2021-09-03 09:48:23
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, package names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The size_list
variable is a sequence of eight-tuples built from the bytes of the encoded size."
A block of code is set as follows:
message_bytes= message.encode("UTF-8") bits_list = list(to_bits(c) for c in message_bytes ) len_h, len_l = divmod( len(message_bytes), 256 ) size_list = [to_bits(len_h), to_bits(len_l)] bit_sequence( size_list+bits_list )
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
w, h = ship.size
for p,m in enumerate( bit_sequence(size_list+bits_list) ):
y, x = divmod( p, w )
r, g, b = ship.getpixel( (x,y) )
r_new = (r & 0xfe) | m
print( (r, g, b), m, (r_new, g, b) )
ship.putpixel( (x,y), (r_new, g, b) )
Any command-line input or output is written as follows:
$ python3.3 -m doctest ourfile.py
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "There is an Advanced Settings panel that defines these file associations."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
- Unity 2020 By Example
- 造個小程序:與微信一起干件正經(jīng)事兒
- Python 深度學習
- 軟件測試項目實戰(zhàn)之性能測試篇
- Android 7編程入門經(jīng)典:使用Android Studio 2(第4版)
- 你必須知道的204個Visual C++開發(fā)問題
- 精通Linux(第2版)
- 深入分布式緩存:從原理到實踐
- Natural Language Processing with Java and LingPipe Cookbook
- 新一代SDN:VMware NSX 網(wǎng)絡原理與實踐
- BeagleBone Robotic Projects(Second Edition)
- OpenCV 3 Blueprints
- Visual C++開發(fā)寶典
- Learning Concurrency in Python
- Java自然語言處理(原書第2版)