{"product_id":"realworld-python-isbn-9781718500624","title":"Real-World Python","description":"\u003cb\u003eA project-based approach to learning Python programming for beginners. Intriguing projects teach you how to tackle challenging problems with code.\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003eYou've mastered the basics. Now you're ready to explore some of Python's more powerful tools.\u003ci\u003e Real-World Python\u003c\/i\u003e will show you how.\u003cbr\u003e\u003cbr\u003eThrough 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:\u003cbr\u003e\u003cbr\u003e\u003cli\u003eSave shipwrecked sailors with an algorithm designed to prove the existence of God\u003c\/li\u003e\u003cli\u003eDetect asteroids and comets moving against a starfield\u003c\/li\u003e\u003cli\u003eProgram a sentry gun to shoot your enemies and spare your friends\u003c\/li\u003e\u003cli\u003eSelect landing sites for a Mars probe using real NASA maps\u003c\/li\u003e\u003cli\u003eSend unbreakable messages based on a book code\u003c\/li\u003e\u003cli\u003eSurvive a zombie outbreak using data science\u003c\/li\u003e\u003cli\u003eDiscover exoplanets and alien megastructures orbiting distant stars\u003c\/li\u003e\u003cli\u003eTest the hypothesis that we're all living in a computer simulation\u003c\/li\u003e\u003cli\u003eAnd more!\u003c\/li\u003e\u003cbr\u003eIf 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!\u003cb\u003eIntroduction\u003c\/b\u003e\u003cbr\u003e\u003cb\u003eChapter 1:\u003c\/b\u003e Saving Shipwrecked Sailors with Bayes’ Rule\u003cbr\u003e\u003cb\u003eChapter 2:\u003c\/b\u003e Attributing Authorship with Stylometry\u003cbr\u003e\u003cb\u003eChapter 3: \u003c\/b\u003eSummarizing Speeches\u003cbr\u003e\u003cb\u003eChapter 4:\u003c\/b\u003e Sending Super Secret Messages\u003cbr\u003e\u003cb\u003eChapter 5:\u003c\/b\u003e Finding Pluto\u003cbr\u003e\u003cb\u003eChapter 6:\u003c\/b\u003e Winning the Moon Race with Apollo 8\u003cbr\u003e\u003cb\u003eChapter 7:\u003c\/b\u003e Selecting Martian Landing Sites\u003cbr\u003e\u003cb\u003eChapter 8: \u003c\/b\u003eDetecting Distant Exoplanets\u003cbr\u003e\u003cb\u003eChapter 9: \u003c\/b\u003eIdentifying Friend or Foe\u003cbr\u003e\u003cb\u003eChapter 10:\u003c\/b\u003e Finding a Safe Space\u003cbr\u003e\u003cb\u003eChapter 11:\u003c\/b\u003e Charting Exoplanets\u003cbr\u003e\u003cb\u003eChapter 12:\u003c\/b\u003e Are we Living in an Alien Simulation?\u003cbr\u003e\u003cb\u003eAppendix:\u003c\/b\u003e Answers to the practice problems\u003cbr\u003e\u003cb\u003eIndex\u003c\/b\u003e\"Python programmers with a little bit of experience, looking for a fun challenge that relates to real-world examples, should read [this book].\"\u003cbr\u003e\u003cb\u003e—Geek Tech Stuff\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003e\"I recommend this book for all Python learners!\"  \u003cbr\u003e\u003cb\u003e—Kelly Paredes, Teaching Python podcast\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003e\"This is the most amazing book anyone could pick up if they are unsure about what machine learning job they should focus on.\"\u003cbr\u003e\u003cb\u003e—Ian Mizer, Atlanta Python Programmers Group\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003e\"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.\" \u003cbr\u003e\u003cb\u003e—Sandra Henry-Stocker, Linux journalist, NetworkWorld (IDG)\u003c\/b\u003e\u003cb\u003eLee Vaughan\u003c\/b\u003e is a programmer, pop culture enthusiast, educator, and author of \u003ci\u003eImpractical Python Projects\u003c\/i\u003e\u003cbr\u003e(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.\u003cb\u003eATTRIBUTING AUTHORSHIP WITH STYLOMETRY\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003ci\u003eStylometry\u003c\/i\u003e is the quantitative study of literary style through computational text analysis. It’s based on the idea that we all have a unique, consistent, and recognizable style to our writing. This includes our vocabulary, our use of punctuation, the average length of our sentences and words, and so on.\u003cbr\u003e\u003cbr\u003eA common application of stylometry is authorship attribution. Do you ever wonder if Shakespeare really wrote all his plays? Or if John Lennon or Paul McCartney wrote the song “In My Life”? Could Robert Galbraith, author of A\u003ci\u003e Cuckoo’s Calling\u003c\/i\u003e, really be J. K. Rowling in disguise? Stylometry can find the answer!\u003cbr\u003e\u003cbr\u003eStylometry has been used to overturn murder convictions and even helped identify and convict the Unabomber in 1996. Other uses include detecting plagiarism and determining the emotional tone behind words, such as in social media posts. Stylometry can even be used to detect signs of mental depression and suicidal tendencies.\u003cbr\u003e\u003cbr\u003eIn this chapter, you’ll use multiple stylometric techniques to determine whether Sir Arthur Conan Doyle or H. G. Wells wrote the novel \u003ci\u003eThe Lost World\u003c\/i\u003e.\u003cbr\u003e\u003cbr\u003e\u003cb\u003eProject #2: The Hound, The War, and The Lost World\u003cbr\u003e\u003cbr\u003e\u003c\/b\u003eSir Arthur Conan Doyle (1859–1930) is best known for the Sherlock Holmes stories, considered milestones in the field of crime fiction. H. G. Wells (1866–1946) is famous for several groundbreaking science fiction novels including T\u003ci\u003ehe War of The Worlds, The Time Machine, The Invisible Man\u003c\/i\u003e, and \u003ci\u003eThe Island of Dr. Moreau\u003c\/i\u003e.\u003cbr\u003e\u003cbr\u003eIn 1912, the \u003ci\u003eStrand Magazine\u003c\/i\u003e published \u003ci\u003eThe Lost World\u003c\/i\u003e, a serialized version of a science fiction novel. It told the story of an Amazon basin expedition, led by zoology professor George Edward Challenger, that encountered living dinosaurs and a vicious tribe of ape-like creatures. \u003cbr\u003e\u003cbr\u003eAlthough the author of the novel is known, for this project, let’s pretend it’s in dispute and it’s your job to solve the mystery. Experts have narrowed the field down to two authors, Doyle and Wells. Wells is slightly favored because \u003ci\u003eThe Lost World\u003c\/i\u003e is a work of science fiction, which is his purview. It also includes brutish troglodytes redolent of the morlocks in his 1895 work \u003ci\u003eThe Time Machine\u003c\/i\u003e. Doyle, on the other hand, is known for detective stories and historical fiction.\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cb\u003eTHE OBJECTIVE\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003eWrite a Python program that uses stylometry to determine whether Sir Arthur Conan Doyle or H. G. Wells wrote the novel T\u003ci\u003ehe Lost World\u003c\/i\u003e.\u003cbr\u003e\u003cbr\u003e\u003cb\u003eTHE STRATEGY\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003eThe science of \u003ci\u003enatural language processing (NLP)\u003c\/i\u003e deals with the interactions between the precise and structured language of computers and the nuanced, frequently ambiguous “natural” language used by humans. Example uses for NLP include machine translations, spam detection, comprehension of search engine questions, and predictive text recognition for cell phone users.\u003cbr\u003e\u003cbr\u003e The most common NLP tests for authorship analyze the following features of a text:\u003cbr\u003e\u003cbr\u003e• \u003cb\u003eWord length\u003c\/b\u003e A frequency distribution plot of the length of words in a document\u003cbr\u003e\u003cbr\u003e• \u003cb\u003eStop words\u003c\/b\u003e A frequency distribution plot of stop words (short, noncontextual function words like \u003ci\u003ethe, but, and if\u003c\/i\u003e)\u003cbr\u003e\u003cbr\u003e• \u003cb\u003eParts of speech\u003c\/b\u003e A frequency distribution plot of words based on their syntactic functions (such as nouns, pronouns, verbs, adverbs, adjectives, and so on)\u003cbr\u003e\u003cbr\u003e• \u003cb\u003eMost common words\u003c\/b\u003e A comparison of the most commonly used words in a text\u003cbr\u003e\u003cbr\u003e• \u003cb\u003eJaccard similarity\u003c\/b\u003e A statistic used for gauging the similarity and diversity of a sample set\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eIf Doyle and Wells have distinctive writing styles, these five tests should be enough to distinguish between them. We’ll talk about each test in more detail in the coding section. \u003cbr\u003e\u003cbr\u003eTo capture and analyze each author’s style, you’ll need a representative \u003ci\u003ecorpus\u003c\/i\u003e, or a body of text. For Doyle, use the famous Sherlock Holmes novel \u003ci\u003eThe Hound of the Baskervilles\u003c\/i\u003e, published in 1902. For Wells, use \u003ci\u003eThe War of the Worlds\u003c\/i\u003e, published in 1898. Both these novels contain more than 50,000 words, more than enough for a sound statistical sampling. You’ll then compare each author’s sample to \u003ci\u003eThe Lost World\u003c\/i\u003e to determine how closely the writing styles match.\u003cbr\u003e\u003cbr\u003eTo perform stylometry, you’ll use the \u003ci\u003eNatural Language Toolkit (NLTK)\u003c\/i\u003e, a popular suite of programs and libraries for working with human language data in Python. It’s free and works on Windows, macOS, and Linux. Created in 2001 as part of a computational linguistics course at the\u003cbr\u003eUniversity of Pennsylvania, NLTK has continued to develop and expand with the help of dozens of contributors.","brand":"No Starch Press","offers":[{"title":"Default Title","offer_id":46302189584613,"sku":"NP9781718500624","price":39.99,"currency_code":"USD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1842\/7735\/files\/9781718500624.jpg?v=1767735478","url":"https:\/\/k12savings.com\/es\/products\/realworld-python-isbn-9781718500624","provider":"K12savings","version":"1.0","type":"link"}