East Baton Rouge Parish Library

Python playground, geeky projects for the curious programmer, Mahesh Venkitachalam

Label
Python playground, geeky projects for the curious programmer, Mahesh Venkitachalam
Language
eng
Bibliography note
Includes bibliographical references and index
Illustrations
illustrations
Index
index present
Literary Form
non fiction
Main title
Python playground
Nature of contents
dictionariesbibliography
Oclc number
1929474066
Responsibility statement
Mahesh Venkitachalam
Sub title
geeky projects for the curious programmer
Summary
"Python is a powerful programming language that's easy to learn and fun to play with. But once you've gotten a handle on the basics, what do you do next? 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."--, Portion of summary from book
Table Of Contents
Brief Contents ; Contents in Detail ; Acknowledgments; Introduction; Who Is This Book For?; What's in This Book?; Part I: Warming Up; Part II: Simulating Life; Part III: Fun with Images; Part IV: Enter the 3D; Part V: Hardware Hacking; Why Python?; Python Versions; The Code in This Book; Part I: Warming Up; Chapter 1: Parsing iTunes Playlists; Anatomy of the iTunes Playlist File; Requirements; The Code; Finding Duplicates; Extracting Duplicates; Finding Tracks Common Across Multiple Playlists; Collecting Statistics; Plotting Your Data; Command Line Options; The Complete CodeRunning the ProgramSummary; Experiments!; Chapter 2: Spirographs; Parametric Equations; Spirograph Equations; Turtle Graphics; Requirements; The Code; The Spiro Constructor; The Setup Functions; The restart() Method; The draw() Method; Creating the Animation; The SpiroAnimator Class; The genRandomParams() Method; Restarting the Program; The update() Method; Showing or Hiding the Cursor; Saving the Curves; Parsing Command Line Arguments and Initialization; The Complete Code; Running the Spirograph Animation; Summary; Experiments!; Part II: Simulating Life; Chapter 3: Conway's Game of LifeHow It WorksRequirements; The Code; Representing the Grid; Initial Conditions; Boundary Conditions; Implementing the Rules; Sending Command Line Arguments to the Program; Initializing the Simulation; The Complete Code; Running the Game of Life Simulation; Summary; Experiments!; Chapter 4: Generating Musical Overtones with the Karplus-Strong Algorithm; How It Works; The Simulation; Creating WAV Files; The Minor Pentatonic Scale; Requirements; The Code; Implementing the Ring Buffer with deque; Implementing the Karplus-Strong Algorithm; Writing a WAV File; Playing WAV Files with pygameThe main() MethodThe Complete Code; Running the Plucked String Simulation; Summary; Experiments!; Chapter 5: Boids: Simulating a Flock; How It Works; Requirements; The Code; Computing the Position and Velocities of the Boids; Setting Boundary Conditions; Drawing a Boid; Applying the Rules of the Boids; Adding a Boid; Scattering the Boids; Command Line Arguments; The Boids Class; The Complete Code; Running the Boids Simulation; Summary; Experiments!; Part III: Fun with Images; Chapter 6: ASCII Art; How It Works; Requirements; The Code; Defining the Grayscale Levels and GridComputing the Average BrightnessGenerating the ASCII Content from the Image; Command Line Options; Writing the ASCII Art Strings to a Text File; The Complete Code; Running the ASCII Art Generator; Summary; Experiments!; Chapter 7: Photomosaics; How It Works; Splitting the Target Image; Averaging Color Values; Matching Images; Requirements; The Code; Reading in the Tile Images; Calculating the Average Color Value of the Input Images; Splitting the Target Image into a Grid; Finding the Best Match for a Tile; Creating an Image Grid; Creating the Photomosaic; Adding the Command Line Options