Muutke küpsiste eelistusi

Real-World Python: A Hacker's Guide to Solving Problems with Code [Pehme köide]

  • Formaat: Paperback / softback, 360 pages, kõrgus x laius: 235x178 mm, 1 Illustrations
  • Ilmumisaeg: 05-Nov-2020
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718500629
  • ISBN-13: 9781718500624
Teised raamatud teemal:
  • Formaat: Paperback / softback, 360 pages, kõrgus x laius: 235x178 mm, 1 Illustrations
  • Ilmumisaeg: 05-Nov-2020
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718500629
  • ISBN-13: 9781718500624
Teised raamatud teemal:
"A book of varied coding projects for readers who know a little Python already and want to expand their skills. Save shipwrecked sailors, discover exoplanets, and more, while gaining experience using free modules like OpenCV, NumPy, Pandas, NLTK, Bokeh, Beautiful Soup, and matplotlib"--

A project-based approach to learning Python programming for beginners. Intriguing projects teach you how to tackle challenging problems with code.

You've mastered the basics. Now you're ready to explore some of Python's more powerful tools. Real-World Python will show you how.

Through a series of hands-on projects, you'll investigate and solve real-world problems using sophisticated computer vision, machine learning, data analysis, and language processing tools. You'll be introduced to important modules like OpenCV, NumPy, Pandas, NLTK, Bokeh, Beautiful Soup, Requests, HoloViews, Tkinter, turtle, matplotlib, and more. You'll create complete, working programs and think through intriguing projects that show you how to:

  &;  Save shipwrecked sailors with an algorithm designed to prove the existence of God
  &;  Detect asteroids and comets moving against a starfield
  &;  Program a sentry gun to shoot your enemies and spare your friends
  &;  Select landing sites for a Mars probe using real NASA maps
  &;  Send unbreakable messages based on a book code
  &;  Survive a zombie outbreak using data science
  &;  Discover exoplanets and alien megastructures orbiting distant stars
  &;  Test the hypothesis that we're all living in a computer simulation
  &;  And more!

If you're tired of learning the bare essentials of Python programming with isolated snippets of code, you'll relish the relevant and geeky fun of Real-World Python!

Arvustused

"Python programmers with a little bit of experience, looking for a fun challenge that relates to real-world examples, should read [ this book]." Geek Tech Stuff

"I recommend this book for all Python learners!"   Kelly Paredes, Teaching Python podcast

"This is the most amazing book anyone could pick up if they are unsure about what machine learning job they should focus on." Ian Mizer, Atlanta Python Programmers Group

"Read this book and do the work. You will find yourself building programs that address real-world problems and readying yourself to attack similarly challenging problems in whatever field you are working." Sandra Henry-Stocker, Linux journalist, NetworkWorld (IDG)

Acknowledgments xvii
Introduction xix
Who Should Read This Book? xx
Why Python? xx
What's in This Book? xx
Python Version, Platform, and IDE xxii
Installing Python xxii
Running Python xxiv
Using a Virtual Environment xxv
Onward! xxv
1 Saving Shipwrecked Sailors With Bates' Rule
1(26)
Bayes' Rule
2(3)
Project #1 Search and Rescue
5(19)
The Strategy
6(1)
Installing the Python Libraries
6(1)
The Bayes Code
6(16)
Playing the Game
22(2)
Summary
24(1)
Further Reading
24(1)
Challenge Project: Smarter Searches
24(1)
Challenge Project: Finding the Best Strategy with MCS
25(1)
Challenge Project: Calculating the Probability of Detection
25(2)
2 Attributing Authorship With Stylometry
27(24)
Project #2 The Hound, The War, and The Lost World
28(19)
The Strategy
28(1)
Installing NLTK
29(3)
The Corpora
32(1)
The Stylometry Code
32(15)
Summary
47(1)
Further Reading
48(1)
Practice Project: Hunting the Hound with Dispersion
48(1)
Practice Project: Punctuation Heatmap
49(1)
Challenge Project: Fixing Frequency
50(1)
2 Summarizing Speeches With Natural Language Processing
51(26)
Project #3 I Have a Dream to Summarize Speeches!
52(9)
The Strategy
52(1)
Web Scraping
53(1)
The "I Have a Dream" Code
53(8)
Project #4 Summarizing Speeches with gensim
61(3)
Installing gensim
61(1)
The Make Your Bed Code
61(3)
Project #5 Summarizing Text with Word Clouds
64(7)
The Word Cloud and PIL Modules
65(1)
The Word Cloud Code
66(4)
Fine-Tuning the Word Cloud
70(1)
Summary
71(1)
Further Reading
72(1)
Challenge Project: Game Night
72(1)
Challenge Project: Summarizing Summaries
73(1)
Challenge Project: Summarizing a Novel
74(1)
Challenge Project: It's Not Just What You Say, It's How You Say It!
75(2)
4 Sending Super-Secret Messages With A Book Cipher
77(18)
The One-Time Pad
78(2)
The Rebecca Cipher
80(1)
Project #6 The Digital Key to Rebecca
80(11)
The Strategy
81(1)
The Encryption Code
82(8)
Sending Messages
90(1)
Summary
91(1)
Further Reading
91(1)
Practice Project: Charting the Characters
92(1)
Practice Project: Sending Secrets the WWII Way
93(2)
5 Finding Pluto
95(28)
Project #7 Replicating a Blink Comparator
96(16)
The Strategy
97(1)
The Data
98(1)
The Blink Comparator Code
99(11)
Using the Blink Comparator
110(2)
Project #8 Detecting Astronomical Transients with Image Differencing
112(7)
The Strategy
113(1)
The Transient Detector Code
113(6)
Using the Transient Detector
119(1)
Summary
119(1)
Further Reading
119(1)
Practice Project: Plotting the Orbital Path
119(1)
Practice Project: What's the Difference?
120(1)
Challenge Project: Counting Stars
120(3)
6 Winning The Moon Race With Apollo 8
123(28)
Understanding the Apollo 8 Mission
124(3)
The Free Return Trajectory
125(1)
The Three-Body Problem
126(1)
Project #9 To the Moon with Apollo 8!
127(19)
Using the turtle Module
127(4)
The Strategy
131(1)
The Apollo 8 Free Return Code
132(12)
Running the Simulation
144(2)
Summary
146(1)
Further Reading
146(1)
Practice Project: Simulating a Search Pattern
146(1)
Practice Project: Start Me Up!
147(1)
Practice Project: Shut Me Down!
148(1)
Challenge Project: True-Scale Simulation
149(1)
Challenge Project: The Real Apollo 8
149(2)
7 Selecting Martian Landing Sites
151(26)
How to Land on Mars
152(1)
The MOLA Map
153(1)
Project #10 Selecting Martian Landing Sites
153(18)
The Strategy
154(1)
The Site Selector Code
155(15)
Results
170(1)
Summary
171(1)
Further Reading
171(1)
Practice Project: Confirming That Drawings Become Part of an Image
172(1)
Practice Project: Extracting an Elevation Profile
172(1)
Practice Project: Plotting in 3D
173(1)
Practice Project: Mixing Maps
173(2)
Challenge Project: Making It Three in a Row
175(1)
Challenge Project: Wrapping Rectangles
175(2)
8 Detecting Distant Exoplanets
177(26)
Transit Photometry
178(1)
Project #11 Simulating an Exoplanet Transit
179(9)
The Strategy
180(1)
The Transit Code
181(5)
Experimenting with Transit Photometry
186(2)
Project #12 Imaging Exoplanets
188(6)
The Strategy
188(1)
The Pixelator Code
189(5)
Summary
194(1)
Further Reading
194(1)
Practice Project: Detecting Alien Megastructures
195(2)
Practice Project: Detecting Asteroid Transits
197(1)
Practice Project: Incorporating Limb Darkening
198(2)
Practice Project: Detecting Starspots
200(1)
Practice Project: Detecting an Alien Armada
200(1)
Practice Project: Detecting a Planet with a Moon
201(1)
Practice Project: Measuring the Length of an Exoplanet's Day
201(1)
Challenge Project: Generating a Dynamic Light Curve
202(1)
9 Identifying Friend Or Foe
203(22)
Detecting Faces in Photographs
204(1)
Project #13 Programming a Robot Sentry Gun
205(14)
The Strategy
207(1)
The Code
207(11)
Results
218(1)
Detecting Faces from a Video Stream
219(2)
Summary
221(1)
Further Reading
222(1)
Practice Project: Blurring Faces
222(1)
Challenge Project: Detecting Cat Faces
223(2)
10 Restricting Access With Face Recognition
225(20)
Recognizing Faces with Local Binary Pattern Histograms
226(5)
The Face Recognition Flowchart
226(2)
Extracting Local Binary Pattern Histograms
228(3)
Project #14 Restricting Access to the Alien Artifact
231(11)
The Strategy
231(1)
Supporting Modules and Files
231(1)
The Video Capture Code
232(4)
The Face Trainer Code
236(2)
The Face Predictor Code
238(3)
Results
241(1)
Summary
242(1)
Further Reading
242(1)
Challenge Project: Adding a Password and Video Capture
242(1)
Challenge Project: Look-Alikes and Twins
243(1)
Challenge Project: Time Machine
243(2)
11 Creating An Interactive Zombie Escape Map
245(24)
Project #15 Visualizing Population Density with a Choropleth Map
246(20)
The Strategy
247(1)
The Python Data Analysis Library
248(1)
The bokeh and holoviews Libraries
249(1)
Installing pandas, bokeh, and holoviews
250(1)
Accessing the County, State, Unemployment, and Population Data
250(2)
Hacking holoviews
252(2)
The Choropleth Code
254(8)
Planning the Escape
262(4)
Summary
266(1)
Further Reading
266(1)
Challenge Project: Mapping US Population Change
266(3)
12 Are We Living In A Computer Simulation?
269(14)
Project #16 Life, the Universe, and Yertle's Pond
270(9)
The Pond Simulation Code
270(3)
Implications of the Pond Simulation
273(2)
Measuring the Cost of Crossing the Lattice
275(2)
Results
277(1)
The Strategy
278(1)
Summary
279(1)
Further Reading
279(1)
Moving On
279(1)
Challenge Project: Finding a Safe Space
279(1)
Challenge Project: Here Comes the Sun
280(1)
Challenge Project: Seeing Through a Dog's Eyes
281(1)
Challenge Project: Customized Word Search
281(1)
Challenge Project: Simplifying a Celebration Slideshow
281(1)
Challenge Project: What a Tangled Web We Weave
281(1)
Challenge Project: Go Tell It on the Mountain
281(2)
Appendix: Practice Project Solutions
283(32)
Chapter 2 Attributing Authorship with Stylometry
283(2)
Hunting the Hound with Dispersion
283(1)
Punctuation Heatmap
284(1)
Chapter 4 Sending Super-Secret Messages with a Book Cipher
285(4)
Charting the Characters
285(1)
Sending Secrets the WWII Way
286(3)
Chapter 5 Finding Pluto
289(3)
Plotting the Orbital Path
289(1)
What's the Difference?
290(2)
Chapter 6 Winning the Moon Race with Apollo 8
292(6)
Simulating a Search Pattern
292(1)
Start Me Upl
293(3)
Shut Me Down 1
296(2)
Chapter 7 Selecting Martian Landing Sites
298(6)
Confirming That Drawings Become Part of an Image
298(1)
Extracting an Elevation Profile
298(1)
Plotting in 3D
299(1)
Mixing Maps
300(4)
Chapter 8 Detecting Distant Exoplanets
304(8)
Detecting Alien Megastructures
304(1)
Detecting Asteroid Transits
305(1)
Incorporating Limb Darkening
306(1)
Detecting an Alien Armada
307(2)
Detecting a Planet with a Moon
309(2)
Measuring the Length of an Exoplanet's Day
311(1)
Chapter 9 Identifying Friend or Foe
312(1)
Blurring Faces
312(1)
Chapter 10 Restricting Access with Face Recognition
312(3)
Challenge Project: Adding a Password and Video Capture
312(3)
Index 315
Lee Vaughan is a programmer, pop culture enthusiast, educator, and author of Impractical Python Projects (No Starch Press). As a former executive-level scientist at ExxonMobil, he spent decades constructing and reviewing complex computer models, developed and tested software, and trained geoscientists and engineers.