Topics include:The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functionsThe relationships among std::move, std::forward, rvalue references, and universal referencesTechniques for writing clear, correct, effective lambda expressionsHow std::atomic differs from volatile, how each should be used, and how they relate to C++'s concurrency APIHow best practices in "old" C++ programming (i.e., C++98) require revision for software development in modern C++
Effective Modern C++ follows the proven guideline-based, example-driven format of Scott Meyers' earlier books, but covers entirely new material.
"After I learned the C++ basics, I then learned how to use C++ in production code from Meyer's series of Effective C++ books. Effective Modern C++ is the most important how-to book for advice on key guidelines, styles, and idioms to use modern C++ effectively and well. Don't own it yet? Buy this one. Now".
-- Herb Sutter, Chair of ISO C++ Standards Committee and C++ Software Architect at Microsoft
In Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required. Once you’ve mastered the basics of programming, you’ll create Python programs that effortlessly perform useful and impressive feats of automation to:Search for text in a file or across multiple filesCreate, update, move, and rename files and foldersSearch the Web and download online contentUpdate and format data in Excel spreadsheets of any sizeSplit, merge, watermark, and encrypt PDFsSend reminder emails and text notificationsFill out online forms
Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.
Don’t spend your time doing work a well-trained monkey could do. Even if you’ve never written a line of code, you can make your computer do the grunt work. Learn how in Automate the Boring Stuff with Python.
Note: The programs in this book are written to run on Python 3.
Complete with quizzes, exercises, and helpful illustrations, this easy-to-follow, self-paced tutorial gets you started with both Python 2.7 and 3.3— the latest releases in the 3.X and 2.X lines—plus all other releases in common use today. You’ll also learn some advanced language features that recently have become more common in Python code.Explore Python’s major built-in object types such as numbers, lists, and dictionariesCreate and process objects with Python statements, and learn Python’s general syntax modelUse functions to avoid code redundancy and package code for reuseOrganize statements, functions, and other tools into larger components with modulesDive into classes: Python’s object-oriented programming tool for structuring codeWrite large programs with Python’s exception-handling model and development toolsLearn advanced Python tools, including decorators, descriptors, metaclasses, and Unicode processing
Written by Wes McKinney, the main author of the pandas library, this hands-on book is packed with practical cases studies. It’s ideal for analysts new to Python and for Python programmers new to scientific computing.Use the IPython interactive shell as your primary development environmentLearn basic and advanced NumPy (Numerical Python) featuresGet started with data analysis tools in the pandas libraryUse high-performance tools to load, clean, transform, merge, and reshape dataCreate scatter plots and static or interactive visualizations with matplotlibApply the pandas groupby facility to slice, dice, and summarize datasetsMeasure data by points in time, whether it’s specific instances, fixed periods, or intervalsLearn how to solve problems in web analytics, social sciences, finance, and economics, through detailed examples
Insider techniques and creative challenges throughout show you how to extend the hacks and how to write your own exploits.
When it comes to offensive security, your ability to create powerful tools on the fly is indispensable. Learn how in Black Hat Python.
You Will Learn Python!
Zed Shaw has perfected the world's best system for learning Python. Follow it and you will succeed-just like the hundreds of thousands of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.
In Learn Python the Hard Way, Third Edition, you'll learn Python by working through 52 brilliantly crafted exercises. Read them. Type their code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you'll learn how software works; what good programs look like; how to read, write, and think about code; and how to find and fix your mistakes using tricks professional programmers use. Most importantly, you'll learn the following, which you need to start writing excellent Python software of your own:Installing a complete Python environment Organizing and writing code Basic mathematics Variables Strings and text Interacting with users Working with files Looping and logic Data structures using lists and dictionaries Program design Object-oriented programming Inheritance and composition Modules, classes, and objects Python packaging Debugging Automated testing Basic game development Basic web development
It'll be hard at first. But soon, you'll just get it-and that will feel great!
This tutorial will reward you for every minute you put into it. Soon, you'll know one of the world's most powerful, popular programming languages. You'll be a Python programmer.
Watch Zed, too! The accompanying DVD contains 5+ hours of passionate, powerful teaching: a complete Python video course!
Python Crash Course is a fast-paced, thorough introduction to Python that will have you writing programs, solving problems, and making things that work in no time.
In the first half of the book, you’ll learn about basic programming concepts, such as lists, dictionaries, classes, and loops, and practice writing clean and readable code with exercises for each topic. You’ll also learn how to make your programs interactive and how to test your code safely before adding it to a project. In the second half of the book, you’ll put your new knowledge into practice with three substantial projects: a Space Invaders–inspired arcade game, data visualizations with Python’s super-handy libraries, and a simple web app you can deploy online.
As you work through Python Crash Course you’ll learn how to:
*Use powerful Python libraries and tools, including matplotlib, NumPy, and Pygal
*Make 2D games that respond to keypresses and mouse clicks, and that grow more difficult as the game progresses
*Work with data to generate interactive visualizations
*Create and customize Web apps and deploy them safely online
*Deal with mistakes and errors so you can solve your own programming problems
If you’ve been thinking seriously about digging into programming, Python Crash Course will get you up to speed and have you writing real programs fast. Why wait any longer? Start your engines and code!
Uses Python 2 and 3
You’ll gain a strong foundation in the language, including best practices for testing, debugging, code reuse, and other development tips. This book also shows you how to use Python for applications in business, science, and the arts, using various Python tools and open source packages.Learn simple data types, and basic math and text operationsUse data-wrangling techniques with Python’s built-in data structuresExplore Python code structure, including the use of functionsWrite large programs in Python, with modules and packagesDive into objects, classes, and other object-oriented featuresExamine storage from flat files to relational databases and NoSQLUse Python to build web clients, servers, APIs, and servicesManage system tasks such as programs, processes, and threadsUnderstand the basics of concurrency and network programming
Rather than impose development guidelines as other frameworks do, Flask leaves the business of extensions up to you. If you have Python experience, this book shows you how to take advantage of that creative freedom.Learn Flask’s basic application structure and write an example appWork with must-have components—templates, databases, web forms, and email supportUse packages and modules to structure a large application that scalesImplement user authentication, roles, and profilesBuild a blogging feature by reusing templates, paginating item lists, and working with rich textUse a Flask-based RESTful API to expose app functionality to smartphones, tablets, and other third-party clientsLearn how to run unit tests and enhance application performanceExplore options for deploying your web app to a production server
—Andrew Hedges, Tapulous
Inside, you’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works.
Topics include:Data Structures and AlgorithmsStrings and TextNumbers, Dates, and TimesIterators and GeneratorsFiles and I/OData Encoding and ProcessingFunctionsClasses and ObjectsMetaprogrammingModules and PackagesNetwork and Web ProgrammingConcurrencyUtility Scripting and System AdministrationTesting, Debugging, and ExceptionsC Extensions
If you want to find out how to use Python to start answering critical questions of your data, pick up Python Machine Learning – whether you want to get started from scratch or want to extend your data science knowledge, this is an essential and unmissable resource.What You Will LearnExplore how to use different machine learning models to ask different questions of your dataLearn how to build neural networks using Keras and TheanoFind out how to write clean and elegant Python code that will optimize the strength of your algorithmsDiscover how to embed your machine learning model in a web application for increased accessibilityPredict continuous target outcomes using regression analysisUncover hidden patterns and structures in data with clusteringOrganize data using effective pre-processing techniquesGet to grips with sentiment analysis to delve deeper into textual and social media dataIn Detail
Machine learning and predictive analytics are transforming the way businesses and other organizations operate. Being able to understand trends and patterns in complex data is critical to success, becoming one of the key strategies for unlocking growth in a challenging contemporary marketplace. Python can help you deliver key insights into your data – its unique capabilities as a language let you build sophisticated algorithms and statistical models that can reveal new perspectives and answer key questions that are vital for success.
Python Machine Learning gives you access to the world of predictive analytics and demonstrates why Python is one of the world's leading data science languages. If you want to ask better questions of data, or need to improve and extend the capabilities of your machine learning systems, this practical data science book is invaluable. Covering a wide range of powerful Python libraries, including scikit-learn, Theano, and Keras, and featuring guidance and tips on everything from sentiment analysis to neural networks, you'll soon be able to answer some of the most important questions facing you and your organization.Style and approach
Python Machine Learning connects the fundamental theoretical principles behind machine learning to their practical application in a way that focuses you on asking and answering the right questions. It walks you through the key elements of Python and its powerful machine learning libraries, while demonstrating how to get to grips with a range of statistical models.
The book begins with a summary of the nontechnical aspects of interviewing, such as common mistakes, strategies for a great interview, perspectives from the other side of the table, tips on negotiating the best offer, and a guide to the best ways to use EPI.
The technical core of EPI is a sequence of chapters on basic and advanced data structures, searching, sorting, broad algorithmic principles, concurrency, and system design. Each chapter consists of a brief review, followed by a broad and thought-provoking series of problems. We include a summary of data structure, algorithm, and problem solving patterns.
Along the way, you’ll discover new ways to explore math and gain valuable programming skills that you’ll use throughout your study of math and computer science. Learn how to:
-Describe your data with statistics, and visualize it with line graphs, bar charts, and scatter plots
-Explore set theory and probability with programs for coin flips, dicing, and other games of chance
-Solve algebra problems using Python’s symbolic math functions
-Draw geometric shapes and explore fractals like the Barnsley fern, the Sierpinski triangle, and the Mandelbrot set
-Write programs to find derivatives and integrate functions
Creative coding challenges and applied examples help you see how you can put your new math and coding skills into practice. You’ll write an inequality solver, plot gravity’s effect on how far a bullet will travel, shuffle a deck of cards, estimate the area of a circle by throwing 100,000 “darts” at a board, explore the relationship between the Fibonacci sequence and the golden ratio, and more.
Whether you’re interested in math but have yet to dip into programming or you’re a teacher looking to bring programming into the classroom, you’ll find that Python makes programming easy and practical. Let Python handle the grunt work while you focus on the math.
In Learn to Program with Minecraft®, you’ll do all this and more with the power of Python, a free language used by millions of professional and first-time programmers!
Begin with some short, simple Python lessons and then use your new skills to modify Minecraft to produce instant and totally awesome results. Learn how to customize Minecraft to make mini-games, duplicate entire buildings, and turn boring blocks into gold.
You’ll also write programs that:
-Take you on an automated teleportation tour around your Minecraft world
-Build massive monuments, pyramids, forests, and more in a snap!
-Make secret passageways that open when you activate a hidden switch
-Create a spooky ghost town that vanishes and reappears elsewhere
-Show exactly where to dig for rare blocks
-Cast a spell so that a cascade of flowers (or dynamite if you’re daring!) follows your every move
-Make mischief with dastardly lava traps and watery curses that cause huge floods
Whether you’re a Minecraft megafan or a newbie, you’ll see Minecraft in a whole new light while learning the basics of programming. Sure, you could spend all day mining for precious resources or building your mansion by hand, but with the power of Python, those days are over!
Requires: Windows 7 or later; OS X 10.10 or later; or a Raspberry Pi.
Uses Python 3
—Brandon Rhodes, software engineer at Dropbox and chair of PyCon 2016-2017
It’s easy to start coding with Python, which is why the language is so popular. However, Python’s unique strengths, charms, and expressiveness can be hard to grasp, and there are hidden pitfalls that can easily trip you up.
Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, and shortcuts, and explains them with realistic code examples.
Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll learn the best way to accomplish key tasks, so you can write code that’s easier to understand, maintain, and improve.
Key features includeActionable guidelines for all major areas of Python 3.x and 2.x development, with detailed explanations and examples Best practices for writing functions that clarify intention, promote reuse, and avoid bugs Coverage of how to accurately express behaviors with classes and objects Guidance on how to avoid pitfalls with metaclasses and dynamic attributes More efficient approaches to concurrency and parallelism Better techniques and idioms for using Python’s built-in modules Tools and best practices for collaborative development Solutions for debugging, testing, and optimization in order to improve quality and performance
Written by Mark Lutz—widely recognized as the world’s leading Python trainer—Python Pocket Reference is an ideal companion to O’Reilly’s classic Python tutorials, Learning Python and Programming Python, also written by Mark.
This fifth edition covers:Built-in object types, including numbers, lists, dictionaries, and moreStatements and syntax for creating and processing objectsFunctions and modules for structuring and reusing codePython’s object-oriented programming toolsBuilt-in functions, exceptions, and attributesSpecial operator overloading methodsWidely used standard library modules and extensionsCommand-line options and development toolsPython idioms and hintsThe Python SQL Database API
The fact is your brain craves novelty. It's constantly searching, scanning, waiting for something unusual to happen. After all, that's the way it was built to help you stay alive. It takes all the routine, ordinary, dull stuff and filters it to the background so it won't interfere with your brain's real work--recording things that matter. How does your brain know what matters? It's like the creators of the Head First approach say, suppose you're out for a hike and a tiger jumps in front of you, what happens in your brain? Neurons fire. Emotions crank up. Chemicals surge.
That's how your brain knows.
And that's how your brain will learn Java. Head First Java combines puzzles, strong visuals, mysteries, and soul-searching interviews with famous Java objects to engage you in many different ways. It's fast, it's fun, and it's effective. And, despite its playful appearance, Head First Java is serious stuff: a complete introduction to object-oriented programming and Java. You'll learn everything from the fundamentals to advanced topics, including threads, network sockets, and distributed programming with RMI. And the new. second edition focuses on Java 5.0, the latest version of the Java language and development platform. Because Java 5.0 is a major update to the platform, with deep, code-level changes, even more careful study and implementation is required. So learning the Head First way is more important than ever.
If you've read a Head First book, you know what to expect--a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. You'll see why people say it's unlike any other Java book you've ever read.
By exploiting how your brain works, Head First Java compresses the time it takes to learn and retain--complex information. Its unique approach not only shows you what you need to know about Java syntax, it teaches you to think like a Java programmer. If you want to be bored, buy some other book. But if you want to understand Java, this book's for you.
The book deals with some of the most important and challenging areas of programming and computer science, but in a highly pedagogic and readable manner. The book covers both algorithmic theory and programming practice, demonstrating how theory is reflected in real Python programs. Well-known algorithms and data structures that are built into the Python language are explained, and the user is shown how to implement and evaluate others himself.
— Jesse Noller, Python Core Developer and PSF Board Member
Master the Powerful Python Standard Library through Real Code Examples
The Python Standard Library contains hundreds of modules for interacting with the operating system, interpreter, and Internet—all extensively tested and ready to jump-start your application development. The Python Standard Library by Example introduces virtually every important area of the Python 2.7 library through concise, stand-alone source code/output examples, designed for easy learning and reuse.
Building on his popular Python Module of the Week blog series, author and Python expert Doug Hellmann focuses on “showing” not “telling.” He explains code behavior through downloadable examples that fully demonstrate each feature.
You’ll find practical code for working with text, data types, algorithms, math, file systems, networking, the Internet, XML, email, cryptography, concurrency, runtime and language services, and much more. Each section fully covers one module, and links to valuable additional resources, making this book an ideal tutorial and reference. Coverage includesManipulating text with string, textwrap, re, and difflib Implementing data structures: collections, array, queue, struct, copy, and more Reading, writing, and manipulating files and directories Regular expression pattern matching Exchanging data and providing for persistence Archiving and data compression Managing processes and threads Using application “building blocks”: parsing command-line options, prompting for passwords, scheduling events, and logging Testing, debugging, and compilation Controlling runtime configuration Using module and package utilities
If you’re new to Python, this book will quickly give you access to a whole new world of functionality. If you’ve worked with Python before, you’ll discover new, powerful solutions and better ways to use the modules you’ve already tried.
Python Projects is the ultimate resource for the Python programmer with basic skills who is ready to move beyond tutorials and start building projects.
The preeminent guide to bridge the gap between learning and doing, this book walks readers through the "where" and "how" of real-world Python programming with practical, actionable instruction. With a focus on real-world functionality, Python Projects details the ways that Python can be used to complete daily tasks and bring efficiency to businesses and individuals alike.
Python Projects is written specifically for those who know the Python syntax and lay of the land, but may still be intimidated by larger, more complex projects. The book provides a walk-through of the basic set-up for an application and the building and packaging for a library, and explains in detail the functionalities related to the projects. Topics include:
*How to maximize the power of the standard library modules
*Where to get third party libraries, and the best practices for utilization
*Creating, packaging, and reusing libraries within and across projects
*Building multi-layered functionality including networks, data, and user interfaces
*Setting up development environments and using virtualenv, pip, and more
Written by veteran Python trainers, the book is structured for easy navigation and logical progression that makes it ideal for individual, classroom, or corporate training.
For Python developers looking to apply their skills to real-world challenges, Python Projects is a goldmine of information and expert insight.
Each recipe addresses a specific problem, with a discussion that explains the solution and offers insight into how it works. If you’re a beginner, R Cookbook will help get you started. If you’re an experienced data programmer, it will jog your memory and expand your horizons. You’ll get the job done faster and learn more about R in the process.Create vectors, handle variables, and perform other basic functionsInput and output dataTackle data structures such as matrices, lists, factors, and data framesWork with probability, probability distributions, and random variablesCalculate statistics and confidence intervals, and perform statistical testsCreate a variety of graphic displaysBuild statistical models with linear regressions and analysis of variance (ANOVA)Explore advanced statistical techniques, such as finding clusters in your data
"Wonderfully readable, R Cookbook serves not only as a solutions manual of sorts, but as a truly enjoyable way to explore the R language—one practical example at a time."—Jeffrey Ryan, software consultant and R package author
You'll learn language syntax and programming techniques in a clear and concise manner, with lots of examples that illustrate both correct usage and common idioms. Completely updated for version 3.x, Programming Python also delves into the language as a software development tool, with many code examples scaled specifically for that purpose.
Topics include:Quick Python tour: Build a simple demo that includes data representation, object-oriented programming, object persistence, GUIs, and website basicsSystem programming: Explore system interface tools and techniques for command-line scripting, processing files and folders, running programs in parallel, and moreGUI programming: Learn to use Python’s tkinter widget libraryInternet programming: Access client-side network protocols and email tools, use CGI scripts, and learn website implementation techniquesMore ways to apply Python: Implement data structures, parse text-based information, interface with databases, and extend and embed Python
— Joey deVilla, Slashdot contributor
As a complete newbie to the language...I constantly had those little thoughts like, 'this is the way a programming language should be taught.'
— Lasse Koskela , JavaRanch
Apress has been profuse in both its quantity and quality of releasesand (this book is) surely worth adding to your technical reading budget for skills development.
— Blane Warrene, Technology Notes
I am reading this ... because the language seems like a good way to accomplish programming tasks that don't require the low-level bit handling power of C.
— Richard Bejtlich, TaoSecurity
Python is a new and innovative scripting language. It is set to replace Perl as the programming language of choice for shell scripters, and for serious application developers who want a feature-rich, yet simple language to deploy their products.
Dive Into Python is a hands-on guide to the Python language. Each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end.
This is the perfect resource for you if you like to jump into languages fast and get going right away. If you're just starting to learn Python, first pick up a copy of Magnus Lie Hetland's Practical Python.
Designed for the professional programmer, the book is concise, to the point, and highly accessible. It also includes detailed information on the Python library and many advanced subjects that is not available in either the official Python documentation or any other single reference source.
Thoroughly updated to reflect the significant new programming language features and library modules that have been introduced in Python 2.6 and Python 3, the fourth edition of Python Essential Reference is the definitive guide for programmers who need to modernize existing Python code or who are planning an eventual migration to Python 3. Programmers starting a new Python project will find detailed coverage of contemporary Python programming idioms.
This fourth edition of Python Essential Reference features numerous improvements, additions, and updates:Coverage of new language features, libraries, and modules
Practical coverage of Python's more advanced features including generators, coroutines, closures, metaclasses, and decorators Expanded coverage of library modules related to concurrent programming including threads, subprocesses, and the new multiprocessing module Up-to-the-minute coverage of how to use Python 2.6’s forward compatibility mode to evaluate code for Python 3 compatibility Improved organization for even faster answers and better usability Updates to reflect modern Python programming style and idioms Updated and improved example code Deep coverage of low-level system and networking library modules — including options not covered in the standard documentation
How can you take advantage of multi-core architectures or clusters? Or build a system that can scale up and down without losing reliability? Experienced Python programmers will learn concrete solutions to these and other issues, along with war stories from companies that use high performance Python for social media analytics, productionized machine learning, and other situations.Get a better grasp of numpy, Cython, and profilersLearn how Python abstracts the underlying computer architectureUse profiling to find bottlenecks in CPU time and memory usageWrite efficient programs by choosing appropriate data structuresSpeed up matrix and vector computationsUse tools to compile Python down to machine codeManage multiple I/O and computational operations concurrentlyConvert multiprocessing code to run on a local or remote clusterSolve large problems while using less RAM
Author Kurt Smith takes you through Cython’s capabilities, with sample code and in-depth practice exercises. If you’re just starting with Cython, or want to go deeper, you’ll learn how this language is an essential part of any performance-oriented Python programmer’s arsenal.Use Cython’s static typing to speed up Python codeGain hands-on experience using Cython features to boost your numeric-heavy PythonCreate new types with Cython—and see how fast object-oriented programming in Python can beEffectively organize Cython code into separate modules and packages without sacrificing performanceUse Cython to give Pythonic interfaces to C and C++ librariesOptimize code with Cython’s runtime and compile-time profiling toolsUse Cython’s prange function to parallelize loops transparently with OpenMP
Through exercises in each chapter, you’ll try out programming concepts as you learn them. Think Python is ideal for students at the high school or college level, as well as self-learners, home-schooled students, and professionals who need to learn programming basics. Beginners just getting their feet wet will learn how to start with Python in a browser.Start with the basics, including language syntax and semanticsGet a clear definition of each programming conceptLearn about values, variables, statements, functions, and data structures in a logical progressionDiscover how to work with files and databasesUnderstand objects, methods, and object-oriented programmingUse debugging techniques to fix syntax, runtime, and semantic errorsExplore interface design, data structures, and GUI-based programs through case studies
Microservice technologies are moving quickly. Author Sam Newman provides you with a firm grounding in the concepts while diving into current solutions for modeling, integrating, testing, deploying, and monitoring your own autonomous services. You’ll follow a fictional company throughout the book to learn how building a microservice architecture affects a single domain.Discover how microservices allow you to align your system design with your organization’s goalsLearn options for integrating a service with the rest of your systemTake an incremental approach when splitting monolithic codebasesDeploy individual microservices through continuous integrationExamine the complexities of testing and monitoring distributed servicesManage security with user-to-service and service-to-service modelsUnderstand the challenges of scaling microservice architectures
Packed with examples and exercises, Natural Language Processing with Python will help you:
Extract information from unstructured text, either to guess the topic or identify "named entities"Analyze linguistic structure in text, including parsing and semantic analysisAccess popular linguistic databases, including WordNet and treebanksIntegrate techniques drawn from fields as diverse as linguistics and artificial intelligence
This book will help you gain practical skills in natural language processing using the Python programming language and the Natural Language Toolkit (NLTK) open source library. If you're interested in developing web applications, analyzing multilingual news sources, or documenting endangered languages -- or if you're simply curious to have a programmer's perspective on how human language works -- you'll find Natural Language Processing with Python both fascinating and immensely useful.
Ideal for programmers with some Python experience, and those coming to Python from other programming languages, this book covers a wide range of application areas, including web and network programming, XML handling, database interactions, and high-speed numeric computing. Discover how Python provides a unique mix of elegance, simplicity, practicality, and sheer power.
This edition covers:Python syntax, Object-Oriented Python, standard library modules, and third-party Python packagesPython’s support for file and text operations, persistence and databases, concurrent execution, and numeric computationsNetworking basics, event-driven programming, and client-side network protocol modulesPython extension modules, and tools for packaging and distributing extensions, modules, and applications
Begin by building classic games like Hangman, Guess the Number, and Tic-Tac-Toe, and then work your way up to more advanced games, like a text-based treasure hunting game and an animated collision-dodging game with sound effects. Along the way, you’ll learn key programming and math concepts that will help you take your game programming to the next level.
Learn how to:
*Combine loops, variables, and flow control statements into real working programs
*Choose the right data structures for the job, such as lists, dictionaries, and tuples
*Add graphics and animation to your games with the pygame module
*Handle keyboard and mouse input
*Program simple artificial intelligence so you can play against the computer
*Use cryptography to convert text messages into secret code
*Debug your programs and find common errors
As you work through each game, you’ll build a solid foundation in Python and an understanding of computer science fundamentals.
What new game will you create with the power of Python?
The projects in this book are compatible with Python 3.
Python Playground is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. You’ll learn to use common Python tools and libraries like numpy, matplotlib, and pygame to do things like:
*Generate Spirograph-like patterns using parametric equations and the turtle module
*Create music on your computer by simulating frequency overtones
*Translate graphical images into ASCII art
*Write an autostereogram program that produces 3D images hidden beneath random patterns
*Make realistic animations with OpenGL shaders by exploring particle systems, transparency, and billboarding techniques
*Construct 3D visualizations using data from CT and MRI scans
*Build a laser show that responds to music by hooking up your computer to an Arduino
Programming shouldn’t be a chore. Have some solid, geeky fun with Python Playground.
The projects in this book are compatible with both Python 2 and 3.
Using practical examples through the book, author Yves Hilpisch also shows you how to develop a full-fledged framework for Monte Carlo simulation-based derivatives and risk analytics, based on a large, realistic case study. Much of the book uses interactive IPython Notebooks, with topics that include:Fundamentals: Python data structures, NumPy array handling, time series analysis with pandas, visualization with matplotlib, high performance I/O operations with PyTables, date/time information handling, and selected best practicesFinancial topics: mathematical techniques with NumPy, SciPy and SymPy such as regression and optimization; stochastics for Monte Carlo simulation, Value-at-Risk, and Credit-Value-at-Risk calculations; statistics for normality tests, mean-variance portfolio optimization, principal component analysis (PCA), and Bayesian regressionSpecial topics: performance Python for financial algorithms, such as vectorization and parallelization, integrating Python with Excel, and building financial applications based on Web technologies
Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Pythonuses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.
Using everyday objects and familiar language systems such as Braille and Morse code, author Charles Petzold weaves an illuminating narrative for anyone who’s ever wondered about the secret inner life of computers and other smart machines.
It’s a cleverly illustrated and eminently comprehensible story—and along the way, you’ll discover you’ve gained a real context for understanding today’s world of PCs, digital media, and the Internet. No matter what your level of technical savvy, CODE will charm you—and perhaps even awaken the technophile within.
Almost anyone can learn to write working script and create high quality code but they might lack a structured understanding of what it means to be 'Pythonic'. If you are a Python programmer who wants to code efficiently by getting the syntax and usage of a few intricate Python techniques exactly right, this book is for you.What You Will LearnCreate a virtualenv and start a new projectUnderstand how and when to use the functional programming paradigmGet familiar with the different ways the decorators can be written inUnderstand the power of generators and coroutines without digressing into lambda calculusCreate metaclasses and how it makes working with Python far easierGenerate HTML documentation out of documents and code using SphinxLearn how to track and optimize application performance, both memory and cpuUse the multiprocessing library, not just locally but also across multiple machinesGet a basic understanding of packaging and creating your own libraries/applicationsIn Detail
Python is a dynamic programming language. It is known for its high readability and hence it is often the first language learned by new programmers. Python being multi-paradigm, it can be used to achieve the same thing in different ways and it is compatible across different platforms. Even if you find writing Python code easy, writing code that is efficient, easy to maintain, and reuse is not so straightforward.
This book is an authoritative guide that will help you learn new advanced methods in a clear and contextualised way. It starts off by creating a project-specific environment using venv, introducing you to different Pythonic syntax and common pitfalls before moving on to cover the functional features in Python. It covers how to create different decorators, generators, and metaclasses. It also introduces you to functools.wraps and coroutines and how they work. Later on you will learn to use asyncio module for asynchronous clients and servers. You will also get familiar with different testing systems such as py.test, doctest, and unittest, and debugging tools such as Python debugger and faulthandler. You will learn to optimize application performance so that it works efficiently across multiple machines and Python versions. Finally, it will teach you how to access C functions with a simple Python call. By the end of the book, you will be able to write more advanced scripts and take on bigger challenges.Style and Approach
This book is a comprehensive guide that covers advanced features of the Python language, and communicate them with an authoritative understanding of the underlying rationale for how, when, and why to use them.
SQL is a powerful language for querying and manipulating data, but it’s tough to integrate it with your application. SQLAlchemy helps you map Python objects to database tables without substantially changing your existing Python code. If you’re an intermediate Python developer with knowledge of basic SQL syntax and relational theory, this book serves as both a learning tool and a handy reference.
Essential SQLAlchemy includes several sections:SQLAlchemy Core: Provide database services to your applications in a Pythonic way with the SQL Expression LanguageSQLAlchemy ORM: Use the object relational mapper to bind database schema and operations to data objects in your applicationAlembic: Use this lightweight database migration tool to handle changes to the database as your application evolvesCookbook: Learn how to use SQLAlchemy with web frameworks like Flask and libraries like SQLAcodegen
Professional Python goes beyond the basics to teach beginner- and intermediate-level Python programmers the little-known tools and constructs that build concise, maintainable code. Design better architecture and write easy-to-understand code using highly adoptable techniques that result in more robust and efficient applications. Coverage includes Decorators, Context Managers, Magic Methods, Class Factories, Metaclasses, Regular Expressions, and more, including advanced methods for unit testing using asyncio and CLI tools. Each topic includes an explanation of the concept and a discussion on applications, followed by hands-on tutorials based on real-world scenarios. The "Python 3 first" approach covers multiple current versions, while ensuring long-term relevance.
Python offers many tools and techniques for writing better code, but often confusing documentation leaves many programmers in the dark about how to use them. This book shines a light on these incredibly useful methods, giving you clear guidance toward building stronger applications.Learn advanced Python functions, classes, and libraries Utilize better development and testing tools Understand the "what," "when," "why," and "how"
More than just theory or a recipe-style walk-through, this guide helps you learn — and understand — these little-known tools and techniques. You'll streamline your workflow while improving the quality of your output, producing more robust applications with cleaner code and stronger architecture. If you're ready to take your Python skills to the next level, Professional Python is the invaluable guide that will get you there.
You’ll learn the steps necessary to create a successful machine-learning application with Python and the scikit-learn library. Authors Andreas Müller and Sarah Guido focus on the practical aspects of using machine learning algorithms, rather than the math behind them. Familiarity with the NumPy and matplotlib libraries will help you get even more from this book.
With this book, you’ll learn:Fundamental concepts and applications of machine learningAdvantages and shortcomings of widely used machine learning algorithmsHow to represent data processed by machine learning, including which data aspects to focus onAdvanced methods for model evaluation and parameter tuningThe concept of pipelines for chaining models and encapsulating your workflowMethods for working with text data, including text-specific processing techniquesSuggestions for improving your machine learning and data science skills
Discover the timeless techniques and strategies that help you:
Design for minimum complexity and maximum creativity Reap the benefits of collaborative development Apply defensive programming techniques to reduce and flush out errors Exploit opportunities to refactor—or evolve—code, and do it safely Use construction practices that are right-weight for your project Debug problems quickly and effectively Resolve critical construction issues early and correctly Build quality into the beginning, middle, and end of your project
“The cool thing about this book is that it’s great for keeping the programming process fresh. The book helps you to continue to grow and clearly comes from people who have been there.”—Kent Beck, author of Extreme Programming Explained: Embrace Change
“I found this book to be a great mix of solid advice and wonderful analogies!”—Martin Fowler, author of Refactoring and UML Distilled
“I would buy a copy, read it twice, then tell all my colleagues to run out and grab a copy. This is a book I would never loan because I would worry about it being lost.”—Kevin Ruland, Management Science, MSG-Logistics
“The wisdom and practical experience of the authors is obvious. The topics presented are relevant and useful.... By far its greatest strength for me has been the outstanding analogies—tracer bullets, broken windows, and the fabulous helicopter-based explanation of the need for orthogonality, especially in a crisis situation. I have little doubt that this book will eventually become an excellent source of useful information for journeymen programmers and expert mentors alike.”—John Lakos, author of Large-Scale C++ Software Design
“This is the sort of book I will buy a dozen copies of when it comes out so I can give it to my clients.”—Eric Vought, Software Engineer
“Most modern books on software development fail to cover the basics of what makes a great software developer, instead spending their time on syntax or technology where in reality the greatest leverage possible for any software team is in having talented developers who really know their craft well. An excellent book.”—Pete McBreen, Independent Consultant
“Since reading this book, I have implemented many of the practical suggestions and tips it contains. Across the board, they have saved my company time and money while helping me get my job done quicker! This should be a desktop reference for everyone who works with code for a living.”—Jared Richardson, Senior Software Developer, iRenaissance, Inc.
“I would like to see this issued to every new employee at my company....”—Chris Cleeland, Senior Software Engineer, Object Computing, Inc.
“If I’m putting together a project, it’s the authors of this book that I want. . . . And failing that I’d settle for people who’ve read their book.”—Ward Cunningham
Straight from the programming trenches, The Pragmatic Programmer cuts through the increasing specialization and technicalities of modern software development to examine the core process--taking a requirement and producing working, maintainable code that delights its users. It covers topics ranging from personal responsibility and career development to architectural techniques for keeping your code flexible and easy to adapt and reuse. Read this book, and you'll learn how toFight software rot; Avoid the trap of duplicating knowledge; Write flexible, dynamic, and adaptable code; Avoid programming by coincidence; Bullet-proof your code with contracts, assertions, and exceptions; Capture real requirements; Test ruthlessly and effectively; Delight your users; Build teams of pragmatic programmers; and Make your developments more precise with automation.
Written as a series of self-contained sections and filled with entertaining anecdotes, thoughtful examples, and interesting analogies, The Pragmatic Programmer illustrates the best practices and major pitfalls of many different aspects of software development. Whether you're a new coder, an experienced programmer, or a manager responsible for software projects, use these lessons daily, and you'll quickly see improvements in personal productivity, accuracy, and job satisfaction. You'll learn skills and develop habits and attitudes that form the foundation for long-term success in your career. You'll become a Pragmatic Programmer.
Inside, you'll learn about:
Interaction design and physical computingThe Arduino hardware and software development environmentBasics of electricity and electronicsPrototyping on a solderless breadboardDrawing a schematic diagram
And more. With inexpensive hardware and open-source software components that you can download free, getting started with Arduino is a snap. To use the introductory examples in this book, all you need is a USB Arduino, USB A-B cable, and an LED.
Join the tens of thousands of hobbyists who have discovered this incredible (and educational) platform. Written by the co-founder of the Arduino project, with illustrations by Elisa Canducci, Getting Started with Arduino gets you in on the fun! This 128-page book is a greatly expanded follow-up to the author's original short PDF that's available on the Arduino website.
Completely updated for the C++11 standard, Sams Teach Yourself C++ in One Hour a Day presents the language from a practical point of view, helping you learn how to use C++11 to create faster, simpler, and more efficient C++ applications.
Master the fundamentals of C++ and object-oriented programming Understand how C++11 features help you write compact and efficient code using concepts such as lambda expressions, move constructors, and assignment operators Learn the Standard Template Library, including containers and algorithms used in most real-world C++ applications Test your knowledge and expertise using exercises at the end of every lesson
Learn on your own time, at your own pace:No previous programming experience required Learn C++11, object-oriented programming, and analysis Write fast and powerful C++ programs, compile the source code with a gcc compiler, and create executable files Use the Standard Template Library’s (STL) algorithms and containers to write feature-rich yet stable C++ applications Develop sophisticated programming techniques using lambda expressions, smart pointers, and move constructors Learn to expand your program’s power with inheritance and polymorphism Master the features of C++ by learning from programming experts Learn C++11 features that allow you to program compact and high-performance C++ applications TABLE OF CONTENTS
PART I: THE BASICS
LESSON 1: Getting Started with C++11
LESSON 2: The Anatomy of a C++ Program
LESSON 3: Using Variables, Declaring Constants
LESSON 4: Managing Arrays and Strings
LESSON 5: Working with Expressions, Statements, and Operators
LESSON 6: Controlling Program Flow
LESSON 7: Organizing Code with Functions
LESSON 8: Pointers and References Explained
PART II: FUNDAMENTALS OF OBJECT-ORIENTED C++ PROGRAMMING
LESSON 9: Classes and Objects
LESSON 10: Implementing Inheritance
LESSON 11: Polymorphism
LESSON 12: Operator Types and Operator Overloading
LESSON 13: Casting Operators
LESSON 14: An Introduction to Macros and Templates
PART III: LEARNING THE STANDARD TEMPLATE LIBRARY (STL)
LESSON 15: An Introduction to the Standard Template LibraryLESSON 16: The STL String Class
LESSON 17: STL Dynamic Array Classes
LESSON 18: STL list and forward_list
LESSON 19: STL Set Classes
LESSON 20: STL Map Classes
PART IV: MORE STL
LESSON 21: Understanding Function ObjectsLESSON 22: C++11 Lambda Expressions
LESSON 23: STL Algorithms
LESSON 24: Adaptive Containers: Stack and Queue
LESSON 25: Working with Bit Flags Using STL
PART V: ADVANCED C++ CONCEPTS
LESSON 26: Understanding Smart PointersLESSON 27: Using Streams for Input and Output
LESSON 28: Exception Handling
LESSON 29: Going Forward
A: Working with Numbers: Binary and Hexadecimal
B: C++ Keywords
C: Operator Precedence
E: ASCII Codes
With SQLite, you'll discover how to develop a database-backed application that remains manageable in size and complexity. This book guides you every step of the way. You'll get a crash course in data modeling, become familiar with SQLite's dialect of the SQL database language, and much more.Learn how to maintain localized storage in a single file that requires no configurationBuild your own SQLite library or use a precompiled distribution in your applicationGet a primer on SQL, and learn how to use several language functions and extensionsWork with SQLite using a scripting language or a C-based language such as C# or Objective-CUnderstand the basics of database design, and learn how to transfer what you already know to SQLiteTake advantage of virtual tables and modules
"Complex SQL concepts explained clearly."
--D. Richard Hipp, creator of SQLite
This book takes you step-by-step through many fun and educational possibilities. Take advantage of several preloaded programming languages. Use the Raspberry Pi with Arduino. Create Internet-connected projects. Play with multimedia. With Raspberry Pi, you can do all of this and more.Get acquainted with hardware features on the Pi’s board Learn enough Linux to move around the operating system Pick up the basics of Python and Scratch—and start programming Draw graphics, play sounds, and handle mouse events with the Pygame framework Use the Pi’s input and output pins to do some hardware hacking Discover how Arduino and the Raspberry Pi complement each other Integrate USB webcams and other peripherals into your projects Create your own Pi-based web server with Python
The book features hundreds of interesting and practical examples of well-written Go code that cover the whole language, its most important packages, and a wide range of applications. Each chapter has exercises to test your understanding and explore extensions and alternatives. Source code is freely available for download from http://gopl.io/ and may be conveniently fetched, built, and installed using the go get command.