دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش:
نویسندگان: Steven F. Lott
سری:
ISBN (شابک) : 180020745X, 9781800207455
ناشر: Packt Publishing - ebooks Account
سال نشر: 2020
تعداد صفحات: 0
زبان: English
فرمت فایل : EPUB (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 2 مگابایت
در صورت تبدیل فایل کتاب Modern Python Cookbook: 133 recipes to develop flawless and expressive programs in Python 3.8, 2nd Edition به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب Modern Python Cookbook: 133 دستور العمل برای توسعه برنامه های بی عیب و نقص در Python 3.8 ، نسخه 2 نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
دستورالعملهای کاملی که در 15 فصل پخش شدهاند تا به شما کمک کنند بر مشکلات رایج پایتون برای همه در سراسر جهان غلبه کنید. هر دستور العمل یک رویکرد حل مشکل برای حل پایتون موثر دارد.
Python انتخاب ترجیحی توسعه دهندگان، مهندسان، دانشمندان داده، و علاقمندان در همه جا است. این یک زبان عالی است که می تواند برنامه های شما را تقویت کند و سرعت، ایمنی و مقیاس پذیری عالی را ارائه دهد. می توان از آن برای اسکریپت نویسی ساده یا برنامه های کاربردی وب پیچیده استفاده کرد. با افشای پایتون به عنوان یک سری دستور العمل های ساده، این کتاب به شما بینشی از ویژگی های زبان خاص در یک زمینه خاص می دهد. داشتن زمینه ملموس به درک زبان یا ویژگی کتابخانه استاندارد کمک می کند.
این کتاب با 133 دستور العمل در آخرین نسخه Python 3.8 ارائه شده است. دستور العمل ها برای همه مفید خواهد بود، از مبتدیانی که به تازگی پایتون را شروع کرده اند تا متخصصان. شما نه تنها مفاهیم برنامه نویسی پایتون را یاد خواهید گرفت، بلکه نحوه ساخت برنامه های کاربردی پیچیده را نیز یاد خواهید گرفت.
دستورالعمل ها به تمام مفاهیم ضروری پایتون مربوط به ساختارهای داده، برنامه نویسی شی گرا، برنامه نویسی تابعی و برنامه نویسی آماری می پردازند. شما با تفاوت های ظریف نحو پایتون و نحوه استفاده موثر از آن آشنا خواهید شد.
در پایان این کتاب پایتون، به دانش تست، خدمات وب، پیکربندی و برنامه کاربردی مجهز خواهید شد. نکات و ترفندهای یکپارچه سازی شما به دانش نحوه ایجاد برنامههای کاربردی با گزارشگیری انعطافپذیر، پیکربندی قدرتمند، گزینههای خط فرمان، تستهای واحد خودکار و مستندات خوب مجهز خواهید شد.
کتاب Python برای توسعه دهندگان وب، برنامه نویسان، برنامه نویسان سازمانی، مهندسان و بزرگان است. دانشمندان داده اگر مبتدی هستید، این کتاب شما را شروع می کند. اگر باتجربه باشید، پایگاه دانش شما را گسترش خواهد داد. دانش اولیه برنامه نویسی به شما کمک می کند.
Complete recipes spread across 15 chapters to help you overcome commonly faced issues by Python for everybody across the globe. Each recipe takes a problem-solution approach to resolve for effective Python.
Python is the preferred choice of developers, engineers, data scientists, and hobbyists everywhere. It is a great language that can power your applications and provide great speed, safety, and scalability. It can be used for simple scripting or sophisticated web applications. By exposing Python as a series of simple recipes, this book gives you insight into specific language features in a particular context. Having a tangible context helps make the language or a given standard library feature easier to understand.
This book comes with 133 recipes on the latest version of Python 3.8. The recipes will benefit everyone, from beginners just starting out with Python to experts. You'll not only learn Python programming concepts but also how to build complex applications.
The recipes will touch upon all necessary Python concepts related to data structures, object oriented programming, functional programming, and statistical programming. You will get acquainted with the nuances of Python syntax and how to effectively take advantage of it.
By the end of this Python book, you will be equipped with knowledge of testing, web services, configuration, and application integration tips and tricks. You will be armed with the knowledge of how to create applications with flexible logging, powerful configuration, command-line options, automated unit tests, and good documentation.
The Python book is for web developers, programmers, enterprise programmers, engineers, and big data scientists. If you are a beginner, this book will get you started. If you are experienced, it will expand your knowledge base. A basic knowledge of programming would help.
Cover
Copyright
Packt Page
Contributors
Table of Contents
Preface
Chapter 1: Numbers, Strings, and Tuples
Working with large and small integers
Choosing between float, decimal, and fraction
Choosing between true division and floor division
Rewriting an immutable string
String parsing with regular expressions
Building complex strings with f-strings
Building complicated strings from lists of characters
Using the Unicode characters that aren\'t on
our keyboards
Encoding strings – creating ASCII and UTF-8 bytes
Decoding bytes – how to get proper characters from some bytes
Using tuples of items
Using NamedTuples to simplify item access in tuples
Chapter 2: Statements and Syntax
Writing Python script and module files –
syntax basics
Writing long lines of code
Including descriptions and documentation
Writing better RST markup in docstrings
Designing complex if...elif chains
Saving intermediate results with the := \"walrus\"
Avoiding a potential problem with break
statements
Leveraging exception matching rules
Avoiding a potential problem with an
except: clause
Concealing an exception root cause
Managing a context using the with statement
Chapter 3: Function Definitions
Function parameters and type hints
Designing functions with optional parameters
Designing type hints for optional parameters
Using super flexible keyword parameters
Forcing keyword-only arguments with the *separator
Defining position-only parameters with the / separator
Writing hints for more complex types
Picking an order for parameters based on partial functions
Writing clear documentation strings with
RST markup
Designing recursive functions around
Python\'s stack limits
Writing testable scripts with the scriptlibrary
switch
Chapter 4: Built-In Data Structures Part 1: Lists and Sets
Choosing a data structure
Building lists – literals, appending, and comprehensions
Slicing and dicing a list
Deleting from a list – deleting, removing,
popping, and filtering
Writing list-related type hints
Reversing a copy of a list
Building sets – literals, adding,
comprehensions, and operators
Removing items from a set – remove(), pop(),
and difference
Writing set-related type hints
Chapter 5: Built-In Data Structures Part 2: Dictionaries
Creating dictionaries – inserting and updating
Removing from dictionaries – the pop()
method and the del statement
Controlling the order of dictionary keys
Writing dictionary-related type hints
Understanding variables, references, and assignment
Making shallow and deep copies of objects
Avoiding mutable default values for function parameters
Chapter 6: User Inputs and Outputs
Using the features of the print() function
Using input() and getpass() for user input
Debugging with f\"{value=}\" strings
Using argparse to get command-line input
Using cmd to create command-line applications
Using the OS environment settings
Chapter 7: Basics of Classes and Objects
Using a class to encapsulate data and
processing
Essential type hints for class definitions
Designing classes with lots of processing
Using typing.NamedTuple for immutable objects
Using dataclasses for mutable objects
Using frozen dataclasses for
immutable objects
Optimizing small objects with __slots__
Using more sophisticated collections
Extending a built-in collection – a list that
does statistics
Using properties for lazy attributes
Creating contexts and context managers
Managing multiple contexts with multiple
resources
Chapter 8: More Advanced Class Design
Choosing between inheritance and
composition – the \"is-a\" question
Separating concerns via multiple inheritance
Leveraging Python\'s duck typing
Managing global and singleton objects
Using more complex structures – maps of lists
Creating a class that has orderable objects
Improving performance with an ordered collection
Deleting from a list of complicated objects
Chapter 9: Functional Programming Features
Introduction
Writing generator functions with the yield statement
Applying transformations to a collection
Using stacked generator expressions
Picking a subset – three ways to filter
Summarizing a collection – how to reduce
Combining the map and reduce transformations
Implementing \"there exists\" processing
Creating a partial function
Simplifying complex algorithms with
immutable data structures
Writing recursive generator functions with
the yield from statement
Chapter 10: Input/Output, Physical Format, and Logical Layout
Using pathlib to work with filenames
Replacing a file while preserving the previous version
Reading delimited files with the CSV module
Using dataclasses to simplify working with
CSV files
Reading complex formats using regular expressions
Reading JSON and YAML documents
Reading XML documents
Reading HTML documents
Refactoring a .csv DictReader as a dataclass reader
Chapter 11: Testing
Test tool setup
Using docstrings for testing
Testing functions that raise exceptions
Handling common doctest issues
Unit testing with the unittest module
Combining unittest and doctest tests
Unit testing with the pytest module
Combining pytest and doctest tests
Testing things that involve dates or times
Testing things that involve randomness
Mocking external resources
Chapter 12: Web Services
Defining the card model
Using the Flask framework for RESTful APIs
Parsing the query string in a request
Making REST requests with urllib
Parsing the URL path
Parsing a JSON request
Implementing authentication for web services
Chapter 13: Application Integration: Configuration
Finding configuration files
Using YAML for configuration files
Using Python for configuration files
Using class-as-namespace for configuration
Designing scripts for composition
Using logging for control and audit output
Chapter 14: Application Integration: Combination
Combining two applications into one
Combining many applications using the
Command Design Pattern
Managing arguments and configuration in composite applications
Wrapping and combining CLI applications
Wrapping a program and checking the output
Controlling complex sequences of steps
Chapter 15: Statistical Programming and Linear Regression
Using the built-in statistics library
Average of values in a counter
Computing the coefficient of a correlation
Computing regression parameters
Computing an autocorrelation
Confirming that the data is random – the null hypothesis
Locating outliers
Analyzing many variables in one pass
Other Books You May Enjoy
Index