چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

AI-Assisted Programming for Web and Machine Learning

: Anjali Jain, Marina Fernandez, Ayşe Mutlu, Christoffer Noring, Ajit Jaokar

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۲۴
فرمت
PDF
زبان
انگلیسی
حجم فایل
۷٫۹ مگابایت
شابک
9781835086056، 1835086055

دربارهٔ کتاب

Speed up your development processes and improve your productivity by writing practical and relevant prompts to build web applications and Machine Learning (ML) models Key Features • Utilize prompts to enhance frontend and backend web development • Develop prompt strategies to build robust machine learning models • Use GitHub Copilot for data exploration, maintaining existing code bases, and augmenting ML models into web applications Book Description AI-Assisted Programming for Web and Machine Learning shows you how to build applications and machine learning models and automate repetitive tasks. Part 1 focuses on coding, from building a user interface to the backend. You’ll use prompts to create the appearance of an app using HTML, styling with CSS, adding behavior with JavaScript, and working with multiple viewports. Next, you’ll build a web API with Python and Flask and refactor the code to improve code readability. Part 1 ends with using GitHub Copilot to improve the maintainability and performance of existing code. Part 2 provides a prompting toolkit for data science from data checking (inspecting data and creating distribution graphs and correlation matrices) to building and optimizing a neural network. You’ll use different prompt strategies for data preprocessing, feature engineering, model selection, training, hyperparameter optimization, and model evaluation for various machine learning models and use cases. The book closes with chapters on advanced techniques on GitHub Copilot and software agents. There are tips on code generation, debugging, and troubleshooting code. You’ll see how simpler and AI-powered agents work and discover tool calling. Who is this book for? Experienced developers new to GitHub Copilot and ChatGPT can discover the best strategies to improve productivity and deliver projects quicker than traditional methods. This book is ideal for software engineers working on web or machine learning projects. It is also a useful resource for web developers, data scientists, and analysts who want to improve their efficiency with the help of prompting. This book does not teach web development or how different machine learning models work. What you will learn • Speed up your coding and machine learning workflows with GitHub Copilot and ChatGPT • Use an AI-assisted approach across the development lifecycle • Implement prompt engineering techniques in the data science lifecycle • Develop the frontend and backend of a web application with AI assistance • Build machine learning models with GitHub Copilot and ChatGPT • Refactor code and fix faults for better efficiency and readability • Improve your codebase with rich documentation and enhanced workflows Cover Copyright Contributors Preface Chapter 1: It’s a New World, One with AI Assistants, and You’re Invited Introduction How ChatGPT came to be, from NLP to LLMs The rise of LLMs GPT models How LLMs are better The new paradigm, programming with natural language Challenges and limitations About this book Who this book is for Evolution of programming languages Looking ahead How to use this book Chapter 2: Prompt Strategy Introduction Where you are Guidelines for how to prompt efficiently Prompt techniques Task-Action-Guideline prompt pattern (TAG) Persona-Instruction-Context prompt pattern (PIC) Exploratory prompt pattern Learn-Improvise-Feedback-Evaluate prompt pattern (LIFE) Which pattern to choose? Prompt strategy for web development Break down the problem: “web system for inventory management” Further breakdown of the frontend into features Generate prompts for each feature Identify some basic principles for web development, a “prompt strategy” Prompt strategy for data science Problem breakdown: predict sales Further breakdown into features/steps for data science Generate prompts for each step Identify some basic principles for data science, “a prompt strategy for data science” Validate the solution Verification via prompts Classical verification Summary Chapter 3: Tools of the Trade: Introducing Our AI Assistants Introduction Understanding Copilot How Copilot knows what to generate Copilot capabilities and limits Setup and installation Installing Copilot Getting started with Copilot Assignment: improve the code Solution Challenge References Understanding ChatGPT How does ChatGPT work? ChatGPT capabilities and limits Setup and installation Getting started with ChatGPT Prompting Summary Chapter 4: Build the Appearance of Our App with HTML and Copilot Introduction Business problem: e-commerce Problem domain Problem breakdown: identify the features Prompt strategy Page structure Add AI assistance to our page structure Your first prompt, simple prompting, and aiding your AI assistant Your second prompt: adding more context Your third prompt: accept prompt suggestions Challenge: vary the prompt Use case: build a front for an e-commerce Login page Product list page Remaining pages Assignment Challenge Quiz Summary Chapter 5: Style the App with CSS and Copilot Introduction Business problem: e-commerce Problem and data domain Breaking the problem down into features Prompting strategy CSS, or Cascading Style Sheets First CSS CSS by name Assignment Solution Use case: style the e-commerce app Basket page Challenge Quiz Summary Chapter 6: Add Behavior with JavaScript Introduction Business problem: e-commerce Problem and data domain Breaking the problem down into features Prompting strategy Adding JavaScript The role of JavaScript Adding JavaScript to a page A second example: adding a JavaScript library/framework Challenge Use case: adding behavior Improving the output Adding Bootstrap Adding Vue.js Assignment Solution Summary Chapter 7: Support Multiple Viewports Using Responsive Web Layouts Introduction Business problem: e-commerce Problem and data domain Breaking the problem down into features Prompting strategy Viewports Media queries When to adjust to different viewports and make it responsive Use case: make our product gallery responsive Assignment Solution Challenge Summary Chapter 8: Build a Backend with Web APIs Introduction Business domain: e-commerce Problem and data domain Feature breakdown Prompt strategy Web APIs What language and framework should you pick? Planning the Web API Creating a Web API with Python and Flask Step 1: Create a new project Step 2: Install Flask Step 3: Create an entry point Step 4: Create a Flask app Use case: a Web API for an e-commerce site Step 1: Create a Web API for an e-commerce site Step 2: Return JSON instead of text Step 3: Add code to read and write to a database Step 4: Improve the code Run the code Refactor the code Step 5: Document the API Assignment Solution Challenge Summary Chapter 9: Augment Web Apps with AI Services Introduction Business domain, e-commerce Problem and data domain Feature breakdown Prompt strategy Creating a model Coming up with a plan Importing libraries Reading the CSV file Creating test and training datasets Creating a model How good is the model? Predict Saving the model to a .pkl file Creating a REST API in Python Converting the model to ONNX Creating a model in ONNX format Loading the ONNX model in JavaScript Installing onnxruntime in JavaScript Loading the ONNX model in JavaScript Assignment: Build a REST API in JavaScript that consumes the model Solution Quiz Summary Chapter 10: Maintaining Existing Codebases Introduction Prompt strategy Different types of maintenance The maintenance process Addressing a bug 1. Identify the problem 2. Implement the change Adding a new feature 1. Identify a problem and find the function/s to change 2. Implement change, and add a new feature and tests Improving performance Big O notation calculation Measuring performance Improving maintainability 1. Identify the problems. What problems do you see? 2. Add tests and de-risk change 3. Implement change and improve maintainability Challenge Updating an existing e-commerce site Assignment Knowledge check Summary Chapter 11: Data Exploration with ChatGPT Introduction Business problem Problem and data domain Dataset overview Feature breakdown Prompting strategy Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy Strategy 2: Persona-Instructions-Context (PIC) prompt strategy Strategy 3: Learn-Improvise-Feedback-Evaluate (LIFE) prompt strategy Data exploration of the Amazon review dataset using the free version of ChatGPT Feature 1: Loading the dataset Feature 2: Inspecting the data Feature 3: Summary statistics Feature 4: Exploring categorical variables Feature 5: Rating distribution Feature 6: Temporal trends Feature 7: Review length analysis Feature 8: Correlation study Data exploration of the Amazon review dataset using ChatGPT-4o Assignment Challenge Summary Chapter 12: Building a Classification Model with ChatGPT Introduction Business problem Problem and data domain Dataset overview Breaking the problem down into features Prompting strategy Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy Strategy 2: Persona-Instructions-Context (PIC) prompt strategy Strategy 3: Learn-Improvise-Feedback-Evaluate (LIFE) prompt strategy Building a sentiment analysis model to accurately classify Amazon reviews using the free version of ChatGPT Feature 1: Data preprocessing and feature engineering Feature 2: Model selection and baseline training Feature 3: Model evaluation and interpretation Feature 4: Handling imbalanced data Feature 5: Hyperparameter tuning Feature 6: Experimenting with feature representation Building a sentiment analysis model to accurately classify Amazon reviews using ChatGPT-4 or ChatGPT Plus Feature 1: Data preprocessing and feature engineering Feature 2: Model selection and baseline training Feature 3: Model evaluation and interpretation Feature 4: Handling data imbalance Feature 5: Hyperparameter tuning Feature 6: Experimenting with feature representation Assignment Challenge Summary Chapter 13: Building a Regression Model for Customer Spend with ChatGPT Introduction Business problem Problem and data domain Dataset overview Breaking the problem down into features Prompting strategy Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy Strategy 2: Persona-Instructions-Context (PIC) prompt strategy Strategy 3: Learn-Improvise-Feedback-Evaluate (LIFE) prompt strategy Building a simple linear regression model to predict the “Yearly Amount Spent” by customers using the free version of ChatGPT Feature 1: Building the model step by step Feature 2: Applying regularization techniques Feature 3: Generating a synthetic dataset to add complexity Feature 4: Generating code to develop a model in a single step for a synthetic dataset Learning simple linear regression using ChatGPT Plus Feature 1: Building a simple linear regression model step by step Feature 2: Applying regularization techniques Feature 3: Generating a synthetic dataset to add complexity Feature 4: Generating code to develop a model in a single step for a synthetic dataset Assignment Challenge Summary Chapter 14: Building an MLP Model for Fashion-MNIST with ChatGPT Introduction Business problem Problem and data domain Dataset overview Breaking the problem down into features Prompting strategy Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy Strategy 2: Persona-Instructions-Context (PIC) prompt strategy Strategy 3: Learn-Improvise-Feedback-Evaluate (LIFE) prompt strategy Building an MLP model to accurately classify the Fashion-MNIST images using the free version of ChatGPT Feature 1: Building the baseline model Feature 2: Adding layers to the model Feature 3: Experimenting with batch sizes Feature 4: Experimenting with the number of neurons Feature 5: Trying different optimizers Assignment Challenge Summary Chapter 15: Building a CNN Model for CIFAR-10 with ChatGPT Introduction Business problem Problem and data domain Dataset overview Breaking the problem down into features Prompting strategy Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy Strategy 2: Persona-Instructions-Context (PIC) prompt strategy Strategy 3: Learn-Improvise-Feedback-Evaluate (LIFE) prompt strategy Building a CNN model to accurately classify the CIFAR-10 images using the free version of ChatGPT Feature 1: Building the baseline CNN model with a single convolutional layer Feature 2: Experimenting with the addition of convolutional layers Feature 3: Incorporating dropout regularization Feature 4: Implementing batch normalization Feature 5: Optimizing with different optimizers Feature 6: Applying the DavidNet architecture Assignment Challenge Summary Chapter 16: Unsupervised Learning: Clustering and PCA Introduction Breaking the problem down into features Prompt strategy Customer segmentation The dataset Adding AI assistance to the unsupervised learning model development process Load the dataset Inspect the data Summary statistics Preprocessing the data Feature engineering Checking for outliers Removing outliers Data scaling using standardization Deciding on the number of clusters Creating a clustering model Visualize clustering results Final thoughts on clustering and the prompting process Product clustering for an e-commerce project Your initial prompt: Set context Load and preprocess the data Feature engineering and text data preprocessing Feature engineering Choose clustering algorithm Feature scaling Apply clustering algorithm Interpret clusters and visualize results Interpreting cluster Visualizing clusters Creating a word cloud Assigning categories to products and evaluating and refining Evaluate and refine Reflection on prompts for this use case Assignment Solution Summary Chapter 17: Machine Learning with Copilot Introduction GitHub Copilot Chat in your IDE How it works Dataset overview Steps for data exploration Prompt strategy Your initial data exploration prompt: Prompt 1, setting the high-level context Step 1: Load the dataset Running the code for loading data Step 2: Inspect the data Step 3: Summary statistics Step 4: Explore categorical variables Step 5: Distribution of ratings Step 6: Temporal analysis Step 7: Review length analysis Step 8: Correlation analysis Step 9: Additional exploratory analysis Step 10: Text Preprocessing Step 11: Word Frequency Analysis Step 12: Sentiment Score Calculation Text preprocessing Word frequency analysis Sentiment score calculation Step 13: Visualize the Distribution of Sentiment Scores Step 14: Analyze the Relationship Between Sentiment Score and Other Variables Visualize the distribution of sentiment scores Analyze the relationship between sentiment score and other variables Assignment Solution Summary Chapter 18: Regression with Copilot Chat Introduction Regression Dataset overview Explore the dataset Prompt strategy Your initial prompt Exploratory data analysis Data splitting Build a regression model Evaluate the model Evaluation metrics Assignment Summary Chapter 19: Regression with Copilot Suggestions Introduction Dataset overview Prompt strategy Start coding with Copilot’s help Step 1: Import libraries with Copilot’s assistance Step 2: Load and explore the dataset Get types and columns Shape of the dataset Addressing the column types Statistical summary Check for missing values Check for duplicates Scale numerical features Visualization Step 3: Split data into training and testing sets Asking questions Step 4: Build a regression problem Step 5: Train the model Step 6: Evaluate model performance Assignment Summary Chapter 20: Increasing Efficiency with GitHub Copilot Introduction Code generation and automation Copilot’s active editor Copilot Chat Copilot commands Creating a Notebook Creating a project Debugging and troubleshooting Code review and optimization techniques Workspace Visual Studio Code lookup Terminal Assignment Challenge Quiz Summary Chapter 21: Agents in Software Development Introduction What are agents? How do agents work? Simpler agents versus agents using AI Simpler agents A simple agent is not a great conversationalist Improved conversation with tool calling and large language models (LLMs) The anatomy of a conversational agent More on tool calling in LLMs Adding capabilities to GPT using tools Advanced conversations Modeling advanced conversations Pseudo code for advanced conversations Autonomous agents Assignment Challenge Quiz Summary References Chapter 22: Conclusion Recap of the book Major conclusions What’s next At last Join our community on Discord Why subscribe? Packt Page Other Books You May Enjoy Index Code the Copilot way to fully optimize your productivity, following the best practices to master AI-assisted programming With Copilot and ChatGPT as your AI assistants, this guide will teach you how to generate high-quality code, automate repetitive tasks, and streamline your development process. First, you'll explore using a problem formulation approach for your prompts, discovering how to reduce development time and improve your code quality. Beyond the basics, you will apply strategies for effective prompting and explore real-world prompting patterns across various programming domains. Next, you will discover GitHub Copilot best practices for code generation, documentation, testing, optimization, and refactoring. As you progress, you'll explore the intersection of machine learning and AI-assisted coding, delving into machine learning concepts, data preprocessing, supervised and unsupervised learning, and model evaluation. The book also covers web development with GitHub Copilot and ChatGPT, guiding you through the process of building a frontend using HTML, CSS, and JavaScript, and developing a backend with APIs. Youll also explore ethical considerations, fairness and bias mitigation, transparency and interpretability, and privacy and data protection to ensure responsible and impactful AI-assisted development. Whether you're a seasoned developer or just starting, this guide equips you with the skills to excel in your projects. This book is designed for users who want to get the most from GitHub Copilot and ChatGPT to fully optimize their project's performance, whether it's a software development, machine learning, or web development project. Experienced developers new to GitHub Copilot and ChatGPT can discover the best strategies to improve productivity and deliver projects quicker, while beginner developers can shorten the learning curve and learn advanced techniques with the help of AI assistants

قیمت نهایی

۴۹٬۰۰۰ تومان