As a high-level and general interpretive programming language, Python is widely used in the field of artificial intelligence, including machine learning, deep learning, natural language processing and computer vision, due to its concise syntax and easy learning characteristics.Therefore, it is essential to establish a solid Python foundation before starting AI development.
This collection collects and collates Python advanced learning resources, including some classic books, covering file operations and exception handling, stacks and queues, iterators and generators, processes and threads, programming skills and sample code.I hope it will be helpful to everyone.
Points: 1Type: Tutorial and coursewareUploader:honeedleUpload time: 2023-02-20
Introduction: Python Advanced Programming Version 2 _ Zhang Liang and Axin (Translation) _ People's Posts and Telecommunications Publishing House _ 2017-10_v2_ Full Version
Points: 1Type: Technical documentUploader:HyperplatinumUpload time: May 30, 2021
Introduction: The Chinese Version of Python Cookbook (3rd Edition) introduces some skills and methods of using Python in various fields. Its topics cover data structures and algorithms, strings and texts, numbers, dates and times, iterators and generators, files and I/O, data coding and processing, functions, classes and objects, metaprogramming, modules and packages, network and Web programming,Concurrency, utility script and system management, testing, debugging and exception, C language extension, etc.This book covers many common problems in Python applications and proposes general solutions.The book contains a lot of practical programming skills and sample code, and has been tested in the Python 3.3 environment, which can be easily applied to actual projects.In addition, Python Cookbook (Version 3) Chinese also explains in detail how and why the solution works.The Chinese Version of Python Cookbook (Version 3) is very suitable for Python programmers with a certain programming foundation.
Introduction: This book can help you master the real Python programming method, so that you can fully play the powerful functions of the Python language, and write robust and efficient code.Scott Meyers created a concise teaching method dominated by use scenarios in his best-selling book Effective C++. Brett Slatkin, the author of this book, gathered 90 practical principles, development skills and convenient solutions in this way, and explained them with practical code examples.Based on his experience in developing Python infrastructure in Google for many years, Slatkin reveals some little-known subtle features of Python language, and gives idioms that can improve code function and operation efficiency.Through this book, you can understand the wonderful ways to solve key programming tasks, and learn to write code that is easy to understand, easy to maintain, and conducive to improvement.This book praisesTranslator's PrefaceprefacethankChapter 1 Cultivate Python Thinking//1Article 1 Query the Python version you use.//1Article 2 Follow the PEP 8 style guide//2Article 3 Understand the difference between bytes and str//5Article 4 Replace C-style format strings and str.format methods with f-strings that support interpolation//9Article 5 Replace complex expressions with auxiliary functions//19Article 6 Split the data structure directly into multiple variables, and do not access it through subscripts.//21Article 7 Try to use enumerate instead of range//25Article 8 Use zip function to traverse two iterators at the same time//26Article 9 Do not write an else block after the for and while loops//28Article 10 Use assignment expressions to reduce repetitive codes//31Chapter 2 List and Dictionary//37Article 11 Learn to slice the sequence//37Article 12 Do not specify the start/stop subscript and step at the same time in the slice//40Article 13 Capture multiple elements through the unpacking operation with an asterisk instead of slicing//42Article 14 Use the key parameter of the sort method to represent complex sorting logic.//45Article 15 Don't rely too much on the order used when adding entries to the dictionary//51Article 16 Use get to handle the case where the key is not in the dictionary. Do not use in and KeyError.//56Article 17 Use defaultdict to process the missing elements in the internal state instead of setdefault//61Article 18 Learn to use __missing__ to construct default values of dependency keys//63Chapter 3 Functions//66Article 19 Do not split multiple values returned by a function into more than three variables//66Article 20 When encountering an unexpected condition, an exception should be thrown. Do not return None.//69Article 21 Learn how to use variables in the peripheral scope in the closure//71Article 22 Design a clear parameter list for a function with a variable number of location parameters//75Article 23 Use keyword parameters to indicate optional behaviors//77Article 24 Use None and docstring to describe parameters whose default values change.//80Article 25 Design a clear parameter list with parameters that can only be specified by keywords and passed in by location.//83Article 26 Use functools.wraps to define function modifiers//88Chapter 4 Derivation and Generation//91Article 27 Replace map and filter with list derivation//91Article 28 Control the number of sub expressions of inference logic to no more than two//93Article 29 Use assignment expression to eliminate duplicate code in derivation//94Article 30 Do not let a function return to the list directly. Instead, let it generate the values in the list one by one.//97Article 31 Carefully iterate the parameters received by the function//100Article 32 Consider rewriting the list derivation with large amount of data with generator expression//104Article 33 Connect multiple generators through yield from//106Article 34 Do not use send to inject data into the generator//108Article 35 Do not change the status of the generator through throw//113Article 36 Consider assembling iterators and generators with itertools//117Chapter 5 Classes and Interfaces//122Article 37 Use combined classes to implement multi-layer structures, not nested built-in types//122Article 38 Let simple interfaces accept functions instead of class instances//128Article 39 Use @ classmethod polymorphism to construct various objects in the same system//131Article 40 Initialize super classes through super//136Article 41 Consider using mix in classes to represent combinable functions//140Article 42 Priority should be given to using the public attribute to indicate the data that should be protected, not the private attribute.//144Article 43 The user-defined container type should inherit from collections.abc//149Chapter 6 Metaclasses and Attributes//153Article 44 Replace the old setter and getter methods with pure attributes and modifiers//153Article 45 Consider using @ property to implement new attribute access logic. Don't rush to reconstruct the original code.//157Article 46 Use descriptors to rewrite the @ property method to be reused//160Article 47 Use __getattr__, __getattribute__ and __setattr__//165 for inert attributesArticle 48 Use __init_subclass__ to verify whether the subclass is written correctly//170Article 49 Use __init_subclass__ to record the existing subclasses//177Article 50 Annotate class attributes with __set_name__//181Article 51 Give priority to providing combinable extension functions through class modifiers, instead of using metaclasses.//185Chapter 7 Concurrency and Parallelism//191Article 52 Use subprocess to manage sub processes//192Article 53 You can use threads to perform blocking I/O, but do not use them for parallel computing.//195Article 54 Use Lock to prevent multiple threads from competing for the same data//199Article 55 Use the Queue to coordinate the work progress between threads//202Article 56 Learn to judge when concurrency is necessary//210Article 57 Do not create a batch of thread instances every time you fan out.//214Article 58 Learn to refactor code correctly to use Queue for concurrency//218Article 59 If threads must be used for concurrency, consider using ThreadPoolExecutor.//224Article 60 Use coroutine to realize high concurrent I/O//226Article 61 Learn to use asyncio to rewrite I/O implemented through threads//230Article 62 Combine threads and coroutines to successfully migrate code to asyncio.//239Article 63 Keep the event cycle of asyncio unblocked to further improve the responsiveness of the program.//245Article 64 Consider using concurrent.futures to implement true parallel computing//248Chapter 8 Stability and Performance//253Article 65 Reasonably use each code block in the try/exception/else/finally structure//253Article 66 Consider rewriting reusable try/finally code with contextlib and with statements//258Article 67 Use the datetime module to process the local time, not the time module.//262Article 68 Use copyreg to implement reliable pickle operations//265Article 69 Where accurate calculation is required, use decimal to represent the corresponding value//272Article 70 Analyze the performance first and then optimize it//274Article 71 Give priority to implementing producer consumer queue with deque//278Article 72 Consider using bisect to search the sorted sequence//284Article 73 Learn to use heapq to create a priority queue//286Article 74 Consider using memoryview and bytearray to implement bytes without copying.//294Chapter 9 Testing and Debugging//300Article 75 Output debugging information through repr string//301Article 76 Verify relevant behaviors in the TestCase subclass//304Article 77 Write the pre test and post test preparation and cleaning logic in setUp, tearDown, setUpModule and tearDownModule to prevent interference between use cases.//309Article 78 Use Mock to simulate complex functions that the code under test depends on//312Article 79 Encapsulate the system on which the code under test depends for simulation and testing.//319Article 80 Consider using pdb for interactive debugging//322Article 81 Use tracemalloc to master memory usage and leakage.//326Chapter 10 Cooperative Development//329Article 82 Learn to look for modules built by other Python developers//329Article 83 Use the virtual environment to isolate projects and rebuild dependencies//330Article 84 Every function, class and module should write docstring//335Article 85 Arrange modules with packages to provide stable APIs//339Article 86 Consider configuring different deployment environments with module level code//344Article 87 Define root exceptions for self compiled modules, so that callers can specifically handle exceptions related to this API.//346Article 88 Break the circular dependency relationship in an appropriate way//350Article 89 When refactoring, consider reminding developers that the API has changed through warnings.//355Article 90 Consider doing static analysis through typing to eliminate bugs.//361
Introduction: Author: Barry. PTranslator: Lin Qi, etcYear of publication: 2012Have you ever thought that you can learn Python through a book?Head First Python (Chinese Version) goes beyond the boring grammar and grammar manual and teaches you to learn this language through a unique method.You will quickly master the basic knowledge of Python, and then turn to persistent storage, exception handling, Web development, SQLite, data processing and lGoogle App Engine.You will also learn how to write mobile applications for Android, thanks to Python's powerful capabilities.This book will provide a full and complete learning experience to help you become a real Python programmer.The author Barry thinks that your time is very valuable and should not be spent too much on entanglement with new concepts.Through the application of the latest research results of cognitive science and learning theory, Head First Python (Chinese version) can enable you to engage in a learning experience that requires multi sensory participation. This book uses rich and intuitive forms to make your brain really start up, rather than preaching long and tedious sermons to make you sleepy.
Introduction: Introduction to Python Programming (2nd Edition), written by John V. Guttag and translated by Chen Guangxin, published in 2018.Mastering a variety of different ways of thinking is a required course for everyone in college.The ability to use computational thinking to solve problems is a basic skill for programmers.This book is based on the popular MIT MOOC tutorial taught by the author. It aims to cultivate readers' computing thinking and lay a solid foundation for their future IT career.-Take Python 3 as an example, covering most features of Python, focusing on what programming languages can do-How to systematically organize, write and debug medium-sized programs-Understanding computational complexity-Translate the fuzzy problem description into a clear calculation method to solve the problem and deeply understand the whole process-Master useful algorithms and problem reduction techniques-Use randomness and simulation techniques to clearly explain problems that are difficult to obtain closed solutions-Use computing tools (including simple statistics, visualization and machine learning tools) to understand and model dataContent introduction:This book is written based on the MIT programming thinking training handout. The main goal is to help readers master and skillfully use various computing technologies, and have the ability to solve practical problems with computational thinking.Taking Python 3 as an example, the book introduces the systematic organization, writing and debugging of medium-sized programs to help readers understand the computational complexity in depth. It also explains useful algorithms and problem reduction techniques, and discusses the use of various computing tools.Compared with the first edition of the book, the second edition completely rewrites the second half, and all the sample code in the book has been changed from Python 2 to Python 3.This book is suitable for readers who know little about programming but want to use computational methods to solve problems.
Points: 1Type: Technical documentUploader:lcofjpUpload time: October 28, 2017
Introduction: 1Getting Started: You learn quick hacks to start a project.2. Data Structures: I don’t teach every single data structure, but I get you started down the pathto learning them more completely.3. Algorithms: Data structures are fairly pointless without a way to process them.4. Parsing Text: The foundation of computer science is parsing, and knowing how to do that helpsyou learn programming languages as they become popular.
Introduction: Python is a scripting language, which has a wide range of applications, including data analysis, natural language processing, machine learning, scientific computing, recommendation system construction, etc.There are 12 chapters in Python high-performance programming, which focus on how to optimize the code and speed up the running speed of practical applications.This book mainly includes the following topics: background knowledge of computer internal structure, lists and tuples, dictionaries and collections, iterators and generators, matrix and vector computing, concurrency, clusters and work queues, etc*After that, a series of real cases show the problems that need attention in the application scenario.This book is suitable for beginner and intermediate Python programmers, and readers who have some Python language foundation and want to be advanced and improved.catalogChapter 1 Understanding High Performance Python 1Chapter 2 Finding Bottlenecks through Performance Analysis 15Chapter 3 Lists and tuples 58Chapter 4 Dictionary and Collection69Chapter 5 Iterator and Generator84Chapter 6 Matrix and Vector Computation 94Chapter 7 Compiled into C 126Chapter 8 Concurrency 171Chapter 9 Multiprocessing Module193Chapter 10 Clusters and Work Queues251Chapter 11 Using Less RAM 273Chapter 12 Field Lessons 311
Points: 1Type: Technical documentUploader:lcofjpUpload time: April 1, 2018
Introduction: Python programming practice uses design mode, concurrency and program library to create high-quality program.pdf scanning versionPython Programming Practice: Creating High Quality Programs with Design Patterns, Concurrency and Libraries was written by mark summerfield, a well-known technical expert in the python developer community, and recommended by Doug Hellmann, a global senior python expert. It is one of the most influential works in the python field.Through a large number of practical example codes and three complete case studies, the book comprehensively and systematically explains how to use design patterns to plan code structures, how to improve code execution speed through concurrency and python and other technologies, and how to use various python libraries to quickly develop specific applications and games.Python programming practice: using design patterns, concurrency, and libraries to create high-quality programs is divided into eight chapters: chapters 1-3 introduce several design patterns of python (creative design pattern, structural design pattern, and behavioral design pattern);Chapters 4 and 5 explain python's advanced concurrency technology and its usage in detail;Chapter 6 introduces python's advanced network programming;Chapter 7 explains how to develop GUI with tkiner;Chapter 8 explains how to draw 3d graphics with opengl.
Points: 1Type: Technical documentUploader:lcofjpUpload time: January 27, 2015
Introduction: programming python 4th Edition,Covers python 3.x by Mark LutzPython advanced classic books!The contents of Python Programming (Photocopy Version) (Version 4) (2 volumes in total) include: Python Quick Start: building a simple example, including data representation, object-oriented programming, object persistence, GUI and website foundation;System programming: explore system interface tools and technologies for command line script writing, processing files and folders, parallel running programs and other requirements;GUI programming: learn to use Python tkiner component library to create a complete user interface;Internet programming: access client network protocols and email tools, use CGI scripts, and learn website building techniques;More places to apply Python: implementing data structures, analyzing text-based information, accessing databases, and extending and embedding Python.
Introduction: The main contents include the advanced usage and potential pitfalls of common built-in types (values, strings, sets, etc.), formatting methods and regular expressions for text processing, math packages and numpy packages for numerical computation and large-scale data processing, etc.Chapter 1 Review of Basic Knowledge1.1 Python Quick Start1.2 Variables and Naming1.3 Compound assignment operator1.4 Introduction to Python arithmetic operators1.5 Basic data types: integer and floating point1.6 Basic input and output1.7 Function definition1.8 If statement in Python1.9 While statement in Python1.10 Several great small applications1.11 Summary of Python Boolean Operators1.12 Parameters and return values of functions1.13 Forward reference problem1.14 Python string1.15 Python list (and a great sorting application)1.16 For statement and range function1.17 Python tuples1.18 Dictionary1.19 Collection1.20 Global and Local Variablessummaryexercisesrecommendable projectsChapter 2 Advanced String Functions2.1 Immutable string2.2 Data type conversion2.4 Indexing and slicing2.5 Single character function2.6 Using the join function to build a string2.7 Important string functions2.8 Binary, octal and hexadecimal conversion functions2.9 Boolean method of string2.10 Case conversion method2.11 String Search and Replacement2.12 Splitting Strings Using the Split Method2.13 Stripping Characters from a String2.14 String Alignmentsummaryexercisesrecommendable projectsChapter 3 Advanced List Functions3.1 Creating and Using Python Lists3.2 Copy List and Copy List Variable3.3 List index3.3.1 Positive index3.3.2 Negative index3.3.3 Using enumerate to generate index number3.4 Obtaining Data from List Slices3.5 List slice assignment3.6 List operator3.7 Shallow copy and deep copy3.8 List Functions3.9 Listing method: modify the list3.10 List method: get list information3.11 List method: reorder3.12 Stack list: RPN application3.13 Reduce Function3.14 Lambda expression (anonymous function)3.15 List derivation3.16 Dictionary and set derivation3.17 Transfer parameters through list3.18 Multi dimension list3.18.1 Unbalance matrix3.18.2 Creating arbitrarily large matricessummaryexercisesrecommendable projectsChapter 4 Programming Skills, Command Line and Package4.1 Overview4.2 22 Programming Skills4.2.1 Make Python commands span multiple lines as needed4.2.2 Reasonable use of the for cycle4.2.3 Using combination operators (+=, etc.)4.2.4 Multiple assignment4.2.5 Assignment using tuples4.2.6 Use advanced tuple assignment4.2.7 Using List and String "Multiply"4.2.8 Return Multiple Values4.2.9 Using Loop and else Keywords4.2.10 Using Boolean Values and Not Operators4.2.11 Treat strings as character lists4.2.12 Use replace method to eliminate characters4.2.13 Do not write unnecessary cycles4.2.15 Simulate switch statement with function list4.2.16 Correct use of is operator4.2.17 Using Single Line for Loop4.2.18 Compressing Multiple Statements to One Line4.2.19 Write a single line if/then/else statement4.2.20 Creating Enumerated Values with the Range Function4.2.21 Reduce the use of inefficient print functions in IDLE4.2.22 Separate large numbers with underline4.3 Running Python from the Command Line4.3.1 Running on Windows4.3.2 Running on Macintosh System4.3.3 Using pip or pip3 to download software packages4.4 Writing and Using Document Strings4.5 Import software package4.6 Introduction to Python software package4.7 Python functions as a class of objects4.8 Variable length parameter list4.8.1 * args list parameter4.8.2 * * Kwargs List Parameters4.9 Decorators and function analyzers4.10 Generator4.10.1 What is iterator4.10.2 About generators4.11 Accessing Command Line Parameterssummaryexercisesrecommendable projectsChapter 5 Accurately Formatting Text5.1 Format with string format specifier (%)5.2% format specifier5.3 Creating Variable Width Output Fields Using%5.4 Global function format5.5 Format method introduction5.6 Reference parameters according to position (name or index)5.7 repr conversion and str conversion5.8 spec field of format function/method5.8.1 Width of output field5.8.2 Text alignment: fill and align characters5.8.3 Sign5.8.4 Leading "0" character5.8.5 Thousand separator5.8.6 Precision symbol5.8.7 Using precision for string formatting5.8.8 Type specifier type5.8.9 Display in binary5.8.10 Display in octal and hexadecimal5.8.11 Display percentage5.8.12 Example of binary representation5.9 Variable length fieldssummaryexercisesrecommendable projectsChapter 6 Regular Expressions Part 16.1 Introduction to regular expressions6.2 Practical case: telephone number6.3 Improved matching mode6.4 How regular expressions work: compiling and running6.5 Ignore case and other function marks6.6 Regular expressions: basic syntax summary6.6.1 Metacharacters6.6.2 Character set6.6.3 Pattern quantifiers6.6.4 Backtracking, Greedy and Non Greedy6.7 A practical regular expression case6.8 Using match objects6.9 Searching for patterns in strings6.10 Iterative search findall6.11 findall function and grouping problem6.12 Search Repeat Mode6.13 Text replacementsummaryexercisesrecommendable projectsChapter 7 Regular Expressions, Part 27.1 Regular Expression Advanced Syntax Summary7.2 Non marking group7.2.1 Example of matching specification numbers7.2.2 Solving marking problems7.3 Greedy matching and non greedy matching7.4 Advance assertion7.5 Checking multiple patterns using lookahead assertions7.6 Negative antecedent assertion7.7 Naming group7.8 re.split function7.9 Scanner and RPN projects7.10 RPN: do more with scannersummaryexercisesrecommendable projectsChapter 8 Text and Binary Files8.1 Two file formats: text file and binary file8.1.1 Text file8.1.2 Binary files8.2 Summary of binary file reading and writing methods8.3 File/directory system8.4 Handling file opening exceptions8.5 Using the with keyword8.6 Summary of read/write operations8.7 Details of text file operation8.8 Using File Pointers (seek)8.9 Reading text into RPN project8.9.1 Update RPN interpreter code8.9.2 Read RPN from text file8.9.3 Add assignment operator to RPN8.10 Direct read/write binary file8.11 Convert data to fixed length field (struct)8.11.1 Read/write one number at a time8.11.2 Read/write multiple numbers at one time8.11.3 Reading/writing fixed length strings8.11.4 Reading/writing variable length strings8.11.5 Combination of read/write string and number8.11.6 Bottom layer details - high priority and low priority8.12 Using the pickle package8.13 Using the shelve packagesummaryexercisesrecommendable projectsChapter 9 Classes and Magic Methods9.1 Basic syntax of classes and objects9.2 Instance variables in Python9.3 __init__ and __new__ methods9.4 Class and forward reference problems9.5 Methods in Python9.6 Public and private variables and methods9.7 Inheritance9.8 Multiple inheritance9.9 Magic method summary9.10 Explanation of magic method9.10.1 String representation of Python class9.10.2 Object representation method9.10.3 Comparison method9.10.4 Arithmetic operator method9.10.5 unary arithmetic method9.10.6 Reverse method9.10.7 Local operator9.10.8 Conversion method9.10.9 Collection class method9.10.10 Implement __iter__ and __next__ methods9.11 Support multiple parameter types9.12 Dynamic Setting and Obtaining Attributessummaryexercisesrecommendable projectsChapter 10 Decimal, Money and Other Types10.1 Overview of value types10.2 Limitations of floating point types10.3 Decimal10.4 Special operations on Decimal objects10.5 Application of Decimal10.6 Design Money10.7 Build the basic Money class ("including" mode)10.8 Display Money objects (__str__, __repr__)10.9 Other operations related to the Money class10.10 Demo: Money Calculator10.11 Set Default Currency10.12 Money Class and Inheritance10.13 Fraction10.14 Complex classsummaryexercisesSuggested itemsChapter 11 Random Package and math Package11.1 Random package overview11.2 Overview of random functions11.3 Testing Random Package Behavior11.4 Number guessing game11.5 Create Deck Object11.6 Adding Shapes to the Library11.7 Draw normal distribution map11.8 Write your own random number generator11.8.1 Principle of generating random number11.8.2 Simple generator11.9 math package overview11.10 Overview of math package function11.11 Using special values (pi)11.12 Trigonometric function: calculate the height of the tree11.13 Logarithm: Guess the number again11.13.1 How logarithms work11.13.2 Applying logarithms to practical problemssummaryexercisesrecommendable projectsChapter 12 Python Scientific Computing Package - numpy12.1 Overview of array, numpy and matplotlib software packages12.1.1 Array software package12.1.2 numpy software package12.1.3 numpy.random package12.1.4 Matplotlib software package12.2 Using the array software package12.3 Download and import numpy package12.4 Introduction to numpy package: finding the sum of 1~100000012.5 Create numpy array12.5.1 Array function12.5.2 arange function12.5.3 linspace function12.5.4 empty function12.5.5 eye function12.5.6 ones function12.5.7 zeros function12.5.8 full function12.5.9 Copy function12.5.10 fromfunction12.6 Case: Creating a Multiplication Table12.7 Batch Processing Numpy Array12.8 Slicing of numpy array12.9 Multidimensional Slicing12.10 Boolean array: mask used as numpy array12.11 numpy and Elatosene algorithm12.12 Get statistics (standard deviation) of numpy array12.13 Get rows and columns from numpy arraysummaryexercisesrecommendable projectsChapter 13 Advanced Application of Numpy13.1 Advanced mathematical operations based on numpy13.2 Download the matplotlib package13.3 Drawing with numpy and matplotlib13.4 Draw Multiple Lines13.5 Drawing compound interest curve13.6 Create histogram with matplotlib13.7 Circle and aspect ratio13.8 Draw pie chart13.9 Linear algebraic operations using numpy13.9.1 Point product13.9.2 Outer product function13.9.3 Other linear algebraic functions13.10 3D drawing13.11 Application of numpy software package in financial field13.12 Adjust the number line using the xticks and yticks functions13.13 numpy mixed data recording13.14 Reading and writing numpy data filessummaryexercisesrecommendable projectsChapter 14 Multi module and RPN Examples14.1 Overview of modules in Python14.2 Example of a simple dual module14.3 Various forms of import statements14.4 Using the __all__ symbol14.5 Public Variables and Module Private Variables14.6 Main module and __main__ function14.7 Trap: mutual import problem14.8 RPN example: decomposed into two modules14.9 RPN Example: Adding More I/O Instructions14.10 Further modification of RPN example14.10.1 Add Line Number Tracking Function14.10.2 Add non-zero jump function14.11 RPN Case Summarysummaryexercisesrecommendable projectsChapter 15 Obtaining Financial Data from the Internet15.1 Plan in this chapter15.2 Introduction to pandas package15.3 stock_load: a simple data reader15.4 Create a simple stock price chart15.5 Adding titles and legends15.6 Write makeplot function (reconstruction)15.7 Draw the price trend chart of two stocks15.8 Drawing other figures15.9 Limitation of time range15.10 Split chart: sub chart the transaction volume15.11 Add Moving Average15.12 Let the user choosesummaryexercisesrecommendable projectsAppendix A Python Operator Priority TableAppendix B Built in Functions in PythonAppendix C Set MethodAppendix D Dictionary MethodAppendix E Other Syntax Notes
Introduction: ContentsChapter Xu Theory 11.1 Object oriented programming 11.1.1 Birth of object-oriented programming ideology 11.1.2 Object oriented development method 11.1.3 Three features of object-oriented programming 21.1.4 Object oriented programming 61.2 Java Overview 91.2.1 Java System91.2.2 Java Language Features 91.2.3 Java operation mechanism 121.2.4 Java Program Development Environment 131.3 Java Language Basics 141.3.1 Keywords141.3.2 Identifier 151.4 Java Program161.4.1 Java Program Composition 161.4.2 Java Program Development Steps 171.4.3 Java Program Classification 171.4.4 Simple Java Applications 171.4.5 Basic Structure of Java Applications 211.4.6 Note 221.5 Summary of this chapter 22Chapter 2 Classes and Objects232.1 Class 232.1.1 Definition of class232.1.2 Member variables and local variables 232.2 Object 242.2.1 Object declaration and creation 252.2.2 Use and destruction of objects 262.3 Methods 272.3.1 Method declaration 272.3.2 Method overload 282.3.3 Construction method 292.3.4 Class method and instance method 292.4 Static members292.4.1 Static Methods and Variables 292.4.2 Static Variables and Constants 302.4.3 Access to Static Members 302.4.4 main method322.4.5 Factory method 322.5 Package and utility class 332.5.1 Package 332.5.2 Java standard package352.5.3 Utility 362.6 Packaging 372.7 Summary of this chapter 40Chapter 3 Inheritance and Polymorphism 423.1 Inheritance in Java 423.1.1 Inheritance Overview 423.1.2 Subcategory433.1.3 super keyword 443.1.4 Inheritance rule473.1.5 Inheritance and Coverage of Methods493.2 Termination of inheritance: final class and final method523.2.1 Final class 523.2.2 Final method 523.3 Polymorphism533.3.1 Polymorphic Example 533.3.2 Polymorphic type 543.4 Summary of this Chapter57Chapter 4 Multithread Programming 594.1 Processes and Threads594.2 Java Thread Classes and Interfaces604.2.1 Thread class 604.2.2 Runnable interface624.3 Thread scheduling and control644.3.1 Thread status644.3.2 Thread Scheduling 654.3.3 Thread Control664.4 Thread Synchronization Mechanism 674.5 Summary of this chapter 69Chapter 5 I/O and Exception Handling 715.1 Data flow overview 715.1.1 Concept of I/O Stream715.1.2 Java Data Stream Class715.2 Byte stream and character stream 735.2.1 Byte Stream735.2.2 Character Stream775.3 File operation805.3.1 File class 805.3.2 Use of the File class825.4 Object Stream835.5 Exception handling 865.5.1 Exception class 865.5.2 Exception handling mechanism865.5.3 Throwing Exceptions885.5.4 Disadvantages of exception handling 895.5.5 Assertion895.6 Summary of this chapter 90Chapter 6 Sets and Generics 926.1 Collection926.1.1 Collection overview 926.1.2 Collection interface946.1.3 Iterator interface956.1.4 Set interface966.1.5 List interface996.1.6 Map interface1016.2 Generic1046.2.1 Generics overview 1046.2.2 Introducing generics 1046.2.3 Type wildcard1056.2.4 Upper limit of generic type1066.3 Summary of this chapter 107Chapter 7 Graphical User Interface 1087.1 Graphical User Interface Overview 1087.1.1 Overview1087.1.2 Swing and AWT 1087.2 Swing GUI 1107.2.1 Frame1107.2.2 Panel 1127.2.3 Label1147.2.4 Button1157.3 Interface layout 1167.3.1 FlowLayout Layout1167.3.2 BorderLayout layout 1177.3.3 GirdLayout 1187.3.4 CardLayout 1197.4 Common controls and event response1207.4.1 Overview of controls1207.4.2 Common controls 1217.4.3 Incident response1247.5 Summary of this chapter 127Chapter 8 Network Communication Programming1298.1 Overview of Java network programing1298.1.1 Introduction to TCP/IP protocol family1298.1.2 Socket socket 1308.1.3 Java network communication mechanism1318.2 URL and related class1328.2.1 URL class1328.2.2 URLConnection class 1348.3 Socket socket programming1368.3.1 Network address IAddress class 1368.3.2 Socket communication 1378.4 Datagram programming1428.4.1 Datagram introduction1428.4.2 DatagramSocket and DatagramPacket 1428.5 Summary of this chapter 144Chapter 9 Database Programming1459.1 Overview of Java database programing1459.1.1 BC Introduction1459.1.2 The level and importance of BC 1459.1.3 Comparison between BC and ODBC 1469.1.4 Type of BC driver1479.2 BC main classes and interface1499.3 BC database access operation1529.4 Summary of this chapter 156Chapter 0 Basic Knowledge of Web Application Development 15710.1 Operating principle of Web application15710.2 Web server summary15710.3 Web application development15810.3.1 C/S and B/S architecture15810.3.2 Dynamic page language comparison 15910.4 Summary of this chapter 160Chapter 1 JSP Basics 16111.1 Environmental preparation16111.1.1 Installing Tomcat 16111.1.2 Installing MyEclipse 16511.1.3 Configuring MyEclipse 16511.2 Writing a JSP Program16811.2.1 Establishing Web project16811.2.2 JSP directory structure16911.2.3 Interpreting web.xml 17011.2.4 Writing JSP page17011.2.5 Publishing Web project17111.3 JSP syntax17211.3.1 JSP annotation 17211.3.2 JSP declaration17411.3.3 JSP expression17411.4 Compiling Instructions and Action Tag17511.4.1 JSP Directive17511.4.2 JSP Action Tag17711.5 JSP built-in object17811.5.1 Request object17811.5.2 Response object17911.5.3 Session object17911.5.4 Application object and pageContext object18011.5.5 Out object18011.6 Summary of this chapter 181Chapter 2 Servlet 18212.1 Introduction to Servlet18212.2 Servlet code structure18212.3 Servlet Configuration18312.4 Servlet Reading Form Data18412.5 Summary of this chapter 186Chapter 3 JavaBean 18713.1 Introduction to JavaBeans 18713.2 JavaBean development requirements18713.3 Operating JavaBeans with Tags 18813.4 Implementing simple login with JavaBean+Servlet18913.5 Summary of this chapter 194Chapter 4 JSP Project Training 19514.1 Project demand19514.1.1 Project function diagram19514.1.2 Project function description19514.2 Project design19614.2.1 Project use case diagram19614.2.2 Project Flowchart 19714.3 Project database design19814.4 System realization20014.4.1 Database implementation20014.4.2 Design common module20414.4.3 Front and rear platform building page20914.4.4 Realization of data display on the home page of ordinary members22014.4.5 Realization of user login function22514.4.6 Realization of logistics dynamic management function22914.4.7 Realization of logistics knowledge management function23714.4.8 Enter background page23914.4.9 Realization of cargo information management function24014.4.10 Realization of vehicle information management function24214.4.11 Enterprise information24414.4.12 Realization of background logistics dynamic management24614.4.13 Realization of background logistics knowledge management24814.4.14 Realization of background cargo management function24914.4.15 Realization of background vehicle management function25114.4.16 Realization of background enterprise management function25214.4.17 Realization of background announcement management function25314.4.18 Realization of background member management function25514.5 Summary of this Chapter256References 257
Introduction: Python is an object-oriented and interpretive programming language, which has been successfully applied to scientific computing, data analysis, game development and many other fields.This book provides an in-depth introduction to the object-oriented features of Python language, which is divided into three parts and 18 chapters in total.The first part describes how to implement Python style classes with special methods, including __init__ () method, seamless integration with Python - basic special methods, attribute access and features and modifiers, consistency of abstract base class design, use of callable objects and contexts, creation of containers and collections, creation of numeric types, decorators and mixins - crosscutting aspects;Part 2 deals with persistence and serialization. It introduces serialization and preservation, preservation and acquisition of objects with Shelve, preservation and acquisition of objects with SQLite, transmission and sharing of objects, configuration files, and persistence;Part 3 deals with testing, debugging, deployment and maintenance. It respectively introduces the Logging and Warning modules, the design of testability, the use of command lines, the design, quality and documentation of modules and packages.This book deeply analyzes Python to help readers fully master Python and build better applications. It is very suitable for readers who have a certain understanding of the Python language and want to learn Python in depth. It is also suitable for IT practitioners who have some development experience and want to try to use the Python language for programming.
Points: 1Type: Technical documentUploader:HyperplatinumUpload time: May 30, 2021
Introduction: This book introduces the basic knowledge of data structure and algorithm based on Python language, including the basic knowledge of abstract data types and Python object-oriented programming, linear tables, strings, stacks and queues, binary trees and trees, sets, sorting and algorithms.This book continues the idea of problem solving, organizes the teaching content from the goal of problem solving, and focuses on the combination of theory and practice.
Points: 1Type: Technical documentUploader:HyperplatinumUpload time: May 30, 2021
Introduction: As an object-oriented open source programming language, python is easy to understand and extend, and it is very convenient to use.Classic Introduction to Python Programming covers all aspects of python. Through learning this book, readers can use python to write programs immediately.The author James Payne starts with the most basic concepts of the python language, and focuses on the practical application of python 2.6 and 3.1.Through in-depth analysis of some existing python programs, readers can quickly get started.The classic introduction to python programming covers topics ranging from strings, lists, and dictionaries to classes, objects, and modules.With this knowledge, readers will learn how to quickly and confidently create robust, reliable, and reusable python applications.primary coverage◆ Introduce the concept of variables used to store and manipulate data◆ Discuss files and I/O for reading and writing data◆ Summarize frequently ignored python functions◆ Deeply study how to write tests for modules and programs◆ How to use python to write a gui◆ Focus on xml, html, xsl and related technologies◆ Explain how to extend python◆ Sharing numerical programming technology◆ Introduce the internal mechanism of jython, which is a python version written in java
Points: 1Type: Technical documentUploader:HyperplatinumUpload time: May 30, 2021
Introduction: Python is an interpreted, object-oriented, dynamic data type high-level programming language.Python can be used in many fields, from scientific computing to game development.The Python Programming Beginner's Guide tries to help beginners master the Python language and programming skills in an easy and interesting way.The Python Programming Beginner's Guide has 12 chapters. Each chapter will use a complete game to demonstrate the key knowledge points, and learn programming by writing fun little software, which will arouse the interest of readers and reduce the difficulty of learning.At the end of each chapter, the knowledge points of this chapter will be summarized, and some small exercises will be given for the readers to try their hand.The author skillfully embedded all the programming knowledge into these examples, and really achieved the goal of combining education with pleasure.The Python Programming Beginner's Guide is simple and easy to understand, with lively examples. It is an internationally popular Python beginner's guide, suitable for beginner and intermediate readers interested in Python.
Introduction: This book is a Python reading book for computer professionals who have learned programming and have some programming experience, college students and teachers in related majors, and can also be used as a college course textbook or reference book with Python as the D programming language.This book comprehensively introduces various features and application technologies of Python language, discusses the in-depth concepts and situations needed to understand and use Python language correctly, and also introduces some gao level functions that should be understood when developing large or complex programs with Python, such as program module organization and import system, generator, closure and decorator,Basic and gao level object-oriented programming mechanisms and technologies, as well as coroutine and asynchronous programming as new extensions of Python GUI.Chapter 1 Python Basics 11.1 Expression and calculation 11.1.1 Numerical calculation 11.1.2 Standard function and mathematical function package51.1.3 String 71.2 Variables and assignments 101.2.1 Name, variable and assignment 101.2.2 Simple script program 121.2.3 Several situations 131.3 Logic and control141.3.1 Conditional Judgment and Conditional Sentence151.3.2 Circular Statement 181.4 Defining functions201.4.1 Calculation abstraction: function 211.4.2 Functions defined recursively 251.4.3 Relatively complex recursive problems321.5 Some problems of function definition341.5.1 Meaning of function341.5.2 Function decomposition: definition and calling361.5.3 Functions of program framework and functionsParameter 401.5.4 Anonymous functions and lambdaExpression 441.5.5 Scope, Nested Function Definitions 481.5.6 Formal parameters and keywords with default valuesActual parameter 531.6 Summary and Addenda 551.6.1 Bit Operation of Integer551.6.2 Basic character set and some morphologyRule 561.6.3 else segment of loop statement571.6.4 Summary 58Chapter 2 Data Construction and Organization 602.1 Tables and tuples 602.1.1 Table (list) 602.1.2 Use and processing of tables642.1.3 Tuple 712.1.4 Rational number package752.2 Sequence and sequence operation792.2.1 Sequence and sequence operation792.2.2 Description832.2.3 Some program examples862.2.4 Several sequence types892.3 String and Formatting 912.3.1 String operation912.3.2 String Formatting 952.4 Files992.4.1 Documents and input/output992.4.2 Python file function992.4.3 File handler instance 1042.5 Dict 1062.5.1 Concept and Operation1072.5.2 Application examples of dictionary 1092.5.3 Dictionary and Function Parameters1112.6 Set (set and frozenset) 1122.6.1 Concept and Construction1122.6.2 Set operation1142.7 Procedures and data1162.7.1 Text processing 1172.7.2 Data recording and information management1222.7.3 Data Persistence 1272.8 Summary and addenda 1292.8.1 Function formal parameters and actual parameters1292.8.2 Description of split and combined objects1302.8.3 Summary131Chapter 3 Understanding Python 1333.1 Basic semantic issues1333.1.1 Variables and objects1333.1.2 Semantics of functions and parameters1413.1.3 Logical judgement1443.1.4 Several problems 1493.2 Semantic implementation of program1523.2.1 Environment and status1523.2.2 Environment andStatus change 1553.2.3 Function definition structure and functionCalling 1593.2.4 Some problems of function1603.3 Generator functions and closures 1633.3.1 Functions for extracting file data1633.3.2 Generator function1663.3.3 Closure technology and principle1703.3.4 Programming example 1753.4 Exception and exception handling 1783.4.1 Errors in operation 1783.4.2 Python exception handling and tryStructure 1803.4.3 Structure and technology of exception handling 1833.4.4 Predefined exceptions 1873.4.5 Anomaly as a control mechanism1893.5 Efficiency 1923.5.1 Foundation1923.5.2 An example 1983.5.3 Implementation andOperating efficiency 1993.6 Summary and addenda 2043.6.1 Supplement to exception handling mechanism2043.6.2 Generator function advanced2063.6.3 Summary 210Chapter 4 Object Oriented Programming2134.1 Data abstraction, classes, and custom types2134.2 Python Classes and Objects2154.2.1 Definition and use of class2154.2.2 Several problems 2214.2.3 Simple Instance2254.2.4 Python Classes, Objects and Methods2294.3 Inheritance 2304.3.1 Inheritance, Base Class and Derived Class 2304.3.2 Several simple examples 2374.3.3 Multiple Inheritance2414.3.4 Exceptions and Classs2444.4 Special method names and special classs2454.4.1 Container class and iterator2464.4.2 Context Management2484.4.3 Names and standards of some special methodsFunction 2514.5 Example: Link Table 2554.5.1 Basic considerations 2554.5.2 Simple single linked table2574.5.3 Single linked list with tail node points2644.5.4 Double linked list2664.5.5 Discussion 2694.6 Summary and addenda 2694.6.1 Definition and use of objects2694.6.2 Object oriented technology andMethod 2734.6.3 Summary 278Chapter 5 Advanced Python Programming2815.1 Programs and modules2815.1.1 Procedures, modules and execution2825.1.2 Import system2915.1.3 Module and program organization3025.1.4 Dynamic Compilation and Execution3055.1.5 Others of Python programQuestion 3085.2 Decorator 3105.2.1 Definition andUsing 3115.2.2 Function Decorator Instance3165.2.3 Decorator 3215.3 Advanced object-oriented programming3265.3.1 Class creation and customization 3265.3.2 Attribute management and operation3325.3.3 Descriptor3395.3.4 Several object-oriented technologies3465.4 Asynchronous program and coroutine3515.4.1 Asynchronous and concurrent 3525.4.2 Python coroutine3545.4.3 Asynchronous Iteration3605.4.4 Asynchronous context manager andAsync with statement 3655.4.5 Asynchronous description3665.4.6 Examples and discussions 3685.5 Summary and addenda 3745.5.1 Summary 3755.5.2 Programming Technology 376Appendix A Python Language Concise Manual 377A. 1Identifiers and Keywords377A. 2 Code Structure and Interpreter 377A. 3 Basic Type and Literacy 378A. 4 Combination Types and Descriptors 378A. 5 Expression 379A. 6 Statements 381Appendix B Standard Functions 383B. 1 Description of method 383B. 2 Table of standard functions383Appendix C IDLE Development Environment 388C. 1 Debugging function388C. 2 Menu commands 390C. 3 Keyboard operation 393Appendix D Standard library package used in this book 394Recommended Readings 395
Introduction: Recommend a book that is interested in Python, Advanced Python, which is the Chinese translation of Intermediate Python. Intermediate Python has the following advantages: simple, easy to read, and easy to translate.These are not the key points, but the key point is that it is a book that opens a hole in the brain.Whether you are a Python beginner or a Python expert, it will always show you the best things in Python.
Introduction: Author: Bill Lubanovic,Translator: Ding Jiarui/Liang Jie/Yu ChanglongPublished: 2016This book introduces the basic knowledge of Python language and its specific applications in various fields, based on the latest version 3. x.The book first introduces some essential basic knowledge of Python language, and then introduces examples of using Python to develop various applications in business, scientific research and art fields.The text is concise and clear, and the cases are rich and practical. It is a rare Python introduction manual.
Introduction: Author: Zhang Ying/Lai YonghaoPublished: 2014On the way to the "palace of Python technology", this book will provide practical help for you to write robust, elegant and high-quality Python code!The contents are all composed of the best practices of Python coding. From the basic principles, idioms, syntax, libraries, design patterns, internal mechanisms, development tools, and performance optimization, the author deeply discusses the skills and taboos of writing high-quality Python code, and summarizes 91 valuable suggestions.Each suggestion corresponds to a problem that Python programmers may encounter.This book not only gives a very good solution or a very bad solution that has been proved by practice in both positive and negative aspects, but also analyzes the root cause of the problem, which will make people feel enlightened.Writing High Quality Code: 91 Suggestions for Improving Python Programs The application scenarios selected for each problem are very typical, and the suggestions given are closely combined with practice.Every suggestion in the book may show its edge in your next line of code, application or project.It is recommended that you keep this book at hand and check it at any time. I believe that doing so will make your study and development work more efficient with less effort.
Introduction: Author: Sakis KasampalisOriginal name: Mastering Python Design PatternsTranslator: Xia YongfengPublished: 2016This book is divided into three parts and 16 chapters to introduce some common design patterns.The first part introduces the design patterns of object creation, including factory pattern, builder pattern, prototype pattern;The second part introduces the design patterns that deal with the relationship between different entities (classes, objects, etc.) in a system, including appearance pattern, sharing pattern, etc;The third part introduces the design mode of communication between entities of processing system, including responsibility chain mode, observer mode, etc.
Introduction: Contents:What's New in In Depth Python 3Install PythonThe first Python programBuilt in data typeunderstandcharacter stringregular expression Closure and generatorClass&IteratorAdvanced iteratorunit testing restructurefileXMLPython object serializationHTTP Web ServiceCase study: migrating chardet to Python 3Python class library packagingUse 2to3 to migrate code to Python 3Special method nameWhat to read next?