Python Simplified with Generative AI (Duc T. Haba Ashley R. Haba Evan M. Haba) (z-library.sk, 1lib.sk, z-lib.sk)
Author: Duc T. Haba & Ashley R. Haba & Evan M. Haba
其他
No Description
📄 File Format:
PDF
💾 File Size:
33.9 MB
10
Views
0
Downloads
0.00
Total Donations
📄 Text Preview (First 20 pages)
ℹ️
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
📄 Page
1
(This page has no text content)
📄 Page
2
(This page has no text content)
📄 Page
3
Python Simplified with Generative AI Hands-on Python development with GenAI tools integrating data science and web interfaces Duc T. Haba Ashley R. Haba Evan M. Haba www.bpbonline.com
📄 Page
4
First Edition 2025 Copyright © BPB Publications, India eISBN: 978-93-6589-339-7 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true and correct to the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but the publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information.
📄 Page
5
www.bpbonline.com
📄 Page
6
Dedicated to How can you measure the depth of a mom’s love? It’s in the quiet moments that shape our lives. Like a snowy day in Nebraska, with a mom at the wheel of an old Ford Pinto, driving her son to college through a storm. There’s no tragedy, no great epiphany. Just a mom and her son, inching forward, mile by mile, through the swirling snow. That kind of love carries you, even when the road is hard to see. Thank you, Mom, Phuong Kim, for every mile, every moment, ands every unspoken act of care. I love you. This book is for you. - Duc T. Haba To those who challenge themselves. Your greatest gift is your perspective; stay creative and curious. - Ashley R. Haba My father (Bao) is my inspiration to my work, I started my journey with computer science because I wanted to be like him. Thank you for all your support, I love you. This book is for you. - Evan M. Haba
📄 Page
7
• • • About the Authors From a researcher at Xerox PARC, Oracle, RRKidz, and Cognizant to becoming a founder of mobile and AI startups, Duc T. Haba is a world-class AI thought leader and Chief AI Officer. With 30+ years in software, a Marquis Who’s Who Honoree in 2024, an AI book author (two published books), and an AI lecturer and teacher, Duc is well-known in the Silicon Valley as a technology entrepreneurial veteran featured on Apple News in Feb. 2025. Ashley R. Haba is a senior communication major at Santa Clara University with the goal of learning something new each day. She is minoring in creative writing and has a love for poetry and short-form fiction. Moreover, she enjoys knitting, weightlifting, and trying new foods. With a penchant for writing, Ashley has written over a hundred flash fiction stories and poems centered around mental health and overcoming trauma. Currently, she is working on a series of linked stories and can be found writing plenty of flash fiction pieces. Evan M. Haba is currently attending his second year at the University of San Francisco, majoring in computer science. He really enjoys swimming and is on his school’s water polo club team. Moreover, he loves working on projects with GenAI, and has recently
📄 Page
8
participated in a DEPLOY/24 hackathon where he used GenAI as a part of his projects.
📄 Page
9
About the Reviewer Ghaith M. Alomari is an experienced data professional, and IT specialist with a strong background in cloud computing, data science, and automation. He specializes in SQL, Python, Power BI, ML, and cloud-based data solutions. Moreover, he is adept at leveraging tools such as AWS, Snowflake, and Apache NiFi to build efficient data pipelines. His expertise extends to DevOps, DataOps, and infrastructure automation, focusing on ETL processes, business intelligence solutions, and machine learning. Passionate about optimizing data workflows and automating repetitive tasks, Ghaith continuously explores cutting-edge technologies in machine learning, AI-driven analytics, and cloud infrastructure. As an avid reader, he stays up to date with the latest trends in data, DevOps, and analytics, and he actively engages in technical discussions on data governance, security, and AI-driven business intelligence.
📄 Page
10
Acknowledgements We extend our heartfelt gratitude to our family and friends, who patiently endured our odd writing hours and absentminded moments during conversations while our thoughts wandered to what we just wrote and what could be written next. Your support and understanding meant the world to us. A special thank you to BPB Publications for believing in this project and providing the platform to bring it to life. We are deeply grateful for the insights and encouragement from our editor and the dedicated BPB staff assigned to this book. Your guidance and expertise were invaluable. We could not have written this book without each of you. Thank you.
📄 Page
11
Preface This book bridges the gap between traditional education and the practical challenges students encounter today. Instead of relying on conventional programming guides, it combines hands-on learning with modern Generative AI tools like GPT-4o and Copilot. Written by college students alongside an experienced AI expert, it focuses on meeting the needs of a generation that thrives on creativity, quick access to information, and learning through practical experience. This book takes a fresh approach to learning by prioritizing exploration and creativity, much like the way Gen Z engages with games, apps, and hands-on activities. Instead of starting with technical details like algorithms and syntax, it introduces coding through interactive, practical projects in Python Jupyter Notebooks. These projects are relatable and grounded in everyday experiences, making the process intuitive and enjoyable. It is designed specifically for college students who find conventional programming textbooks intimidating. It offers a flexible and personalized learning method, demonstrating how GenAI tools can support your studies. You'll explore Python fundamentals through practical projects while building confidence in your programming skills. The hands- on approach fosters creativity and curiosity, making
📄 Page
12
applying what you have learned to other areas like science, history, or communication easier. By the end of this book, you will acquire practical skills beyond just understanding Python code. You will learn how to confidently write and debug Python programs using Jupyter Notebooks, working through projects that reflect real-world applications. Throughout this journey, you will also gain a deeper understanding of how to integrate Generative AI tools, such as GPT-4 and Copilot, into your workflow. These tools will serve as collaborators, enhancing your learning and problem-solving abilities. You will enhance your creative thinking abilities and tackle coding challenges with curiosity and resourcefulness. In addition to coding, the book provides you with transferable skills applicable to various fields. These skills include breaking down complex problems, experimenting with solutions, and adapting tools to meet your needs. Whether you apply these skills in science, history, communication, or other areas, you will gain a strong foundation for learning in an AI world. Chapter 1: Introduction to GenAI - This chapter is your introduction to Generative AI, focusing on getting started with ChatGPT-4. You will learn what makes GenAI unique, how it works, and the practical ways it can assist you in solving problems, creating content, and exploring new ideas. The chapter provides a step-by-step guide on setting up and accessing GPT-4, ensuring you can start using it immediately. You will also gain insights into prompt engineering—crafting inputs that guide the AI to deliver precise and valuable results. By the end, you will understand how to navigate and use GPT-4 effectively,
📄 Page
13
making it a valuable part of your learning and work process. Chapter 2: Jupyter Notebook - In this chapter, you will learn about the practical uses of Python Jupyter Notebooks, specifically in the Google Colab environment. The focus will be on combining live code with text, visuals, and interactive widgets, creating a versatile space for data analysis and experimentation tasks. Instead of diving into Python programming immediately, this chapter prioritizes understanding the features of Jupyter Notebooks. You will also explore tools like GPT-4o to help generate and analyze code. Through practical examples, you will develop the skills to explore the tool's capabilities and tailor it to your needs, laying a solid groundwork for more advanced learning in subsequent sections. Chapter 3: Dissect The Calculator App - This chapter looks at how Generative AI, such as ChatGPT-4o, can enhance your learning of Python programming through a practical project in Jupyter Notebooks. Using a Python- based calculator app as an example, it shows how to break down and understand the code with the support of GenAI's analytical tools. You will follow a clear, step-by-step guide for building the app, using AI to clarify concepts, explain the logic behind the code, and offer suggestions for improvements. Whether you are a beginner or just seeking a new way to learn, this chapter provides a practical approach that combines GenAI assistance with programming, helping you better understand complex concepts and build your confidence in coding. Chapter 4: Sorting on My Mind - This chapter offers a detailed look at sorting algorithms using Python Jupyter
📄 Page
14
Notebooks and GPT-4o for an interactive learning experience. Sorting is an essential topic in computer science, and it is crucial to understand how different algorithms work for programming and data processing. You will study various algorithms, from bubble sort to quick sort, and implement them in Python to understand their logic and uses. With the help of GPT-4o, you will receive explanations, answers to questions, and code suggestions in real time, providing a personalized learning experience. This hands-on method is designed for learners of all levels to enhance their understanding of sorting algorithms and improve their Python programming skills in an engaging and supportive setting. Chapter 5: Pandas, the Data Tamer - This chapter covers the Pandas library in Python, which is essential for data manipulation and analysis. It also discusses using Generative AI tools like GPT-4o to write Python Pandas code. This chapter suits learners of all levels and focuses on practical applications. You will learn about Pandas’ main features, including working with dataframes and series, cleaning and visualizing data, and applying advanced data manipulation techniques. With the help of Generative AI, the chapter provides straightforward explanations, code examples, and answers your questions to help you understand these concepts better. By engaging in hands-on practice using Jupyter Notebooks, you will develop the skills to work with real-world data and improve your data analysis abilities. Chapter 6: Decipher CNN App - This chapter covers the steps to create an image classification app using Convolutional Neural Networks (CNNs) with Fast.ai. You will gain hands-on experience in organizing projects,
📄 Page
15
preparing image data, and training CNNs while receiving real-time assistance to help clarify concepts and answer questions related to coding. By the end of the chapter, you will understand how CNNs detect image patterns, apply these methods to real-world situations, and use AI tools to support your learning. This practical approach involves working with Python, Fast.ai, and AI assistance to make image classification more accessible. Chapter 7: Gradio and Hugging Face Deployment - This chapter introduces the practical integration of Hugging Face, Gradio, and ChatGPT-4 within Python Jupyter Notebooks, focusing on building and deploying interactive AI applications. You will learn to access and implement advanced Hugging Face models, such as those for natural language processing, and connect them to user- friendly Gradio interfaces for web-based interaction. Along the way, ChatGPT-4o serves as a coding assistant, helping to explain concepts, debug code, and guide you through challenges. By the end of this chapter, you will have the skills to set up a working AI web application, gaining hands-on experience in deploying AI models while improving your understanding of the technology and its real-world applications. Chapter 8: Fairness and Bias - Chapter 8 explores the critical issues of AI fairness and ethics, using ChatGPT-4o as both a learning tool and a case study. It delves into how biases can arise in AI and GenAI systems, from biased training data to technical decisions, and examines their real-world impacts, such as algorithmic discrimination. Readers will gain practical insights into recognizing and questioning potential biases in AI outputs, learn about current efforts to create fairer AI systems and understand
📄 Page
16
their role as users in advocating for ethical AI practices. By the end of the chapter, you will be equipped to critically evaluate AI and GenAI technologies, make informed decisions in using them, and contribute to a future where AI aligns more closely with human values. Chapter 9: Your Turn to Be a Code Walker - The last chapter focuses on helping readers determine if a career in programming and computer science is a good fit for their skills, interests, and goals. It looks at the changing role of GPT-4o in programming. It provides a straightforward overview of the field, including the various job opportunities, the importance of problem-solving and teamwork, and the impact of AI-assisted coding. Readers will learn about the necessary skills and mindset for programming, how to use GenAI as a helpful tool, and the overall job landscape in the technology sector. By the end of the chapter, readers will better understand the challenges and benefits associated with pursuing a career in programming, allowing them to make informed choices about their future.
📄 Page
17
Code Bundle and Coloured Images Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/966to2y The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Python- Simplified-with-Generative-AI. In case there’s an update to the code, it will be updated on the existing GitHub repository. We have code bundles from our rich catalogue of books and videos available at https://github.com/bpbpublications. Check them out! Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at :
📄 Page
18
errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family. Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at : business@bpbonline.com for more details. At www.bpbonline.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks. Piracy If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author
📄 Page
19
If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit www.bpbonline.com. We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. Reviews Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions. We at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit www.bpbonline.com. Join our book’s Discord space Join the book’s Discord Workspace for Latest updates, Offers, Tech happenings around the world, New Release and Sessions with the Authors:
📄 Page
20
https://discord.bpbonline.com
The above is a preview of the first 20 pages. Register to read the complete e-book.
Recommended for You
Loading recommended books...
Failed to load, please try again later