Good Math
Mark C. Chu-Carroll
Mathematics is beautiful--and it can be fun and exciting as well as practical. Good Math is your guide to some of the most intriguing topics from two thousand years of mathematics: from Egyptian fractions to Turing machines; from the real meaning of numbers to proof trees, group symmetry, and mechanical computation. If you've ever wondered what lay beyond the proofs you struggled to complete in high school geometry, or what limits the capabilities of computer on your desk, this is the book for you. Why do Roman numerals persist? How do we know that some infinities are larger than others? And how can we know for certain a program will ever finish? In this fast-paced tour of modern and not-so-modern math, computer scientist Mark Chu-Carroll explores some of the greatest breakthroughs and disappointments of more than two thousand years of mathematical thought. There is joy and beauty in mathematics, and in more than two dozen essays drawn from his popular "Good Math" blog, you'll find concepts, proofs, and examples that are often surprising, counterintuitive, or just plain weird. Mark begins his journey with the basics of numbers, with an entertaining trip through the integers and the natural, rational, irrational, and transcendental numbers. The voyage continues with a look at some of the oddest numbers in mathematics, including zero, the golden ratio, imaginary numbers, Roman numerals, and Egyptian and continuing fractions. After a deep dive into modern logic, including an introduction to linear logic and the logic-savvy Prolog language, the trip concludes with a tour of modern set theory and the advances and paradoxes of modern mechanical computing. If your high school or college math courses left you grasping for the inner meaning behind the numbers, Mark's book will both entertain and enlighten you.
show moreNext-Level A/B Testing
Leemay Nassery
The better tools you have in your experimentation toolkit, the better off teams will be shipping and evaluating new features on a product. Learn how to create robust A/B testing strategies that evolve with your product and engineering needs. See how to run experiments quickly, efficiently, and at less cost with the overarching goal of improving your product experience and your company’s bottom line. The long-term success of any product hinges on a company's ability to experiment quickly and effectively. The more a company evolves and grows, the more demand there is on the experimentation platform. To continue to meet testing demands and empower teams to leverage A/B testing in their product development life cycle, it's vital to incorporate techniques to improve testing velocity, cost, and quality. Learn how to create an A/B testing environment for the long term that lets you quickly construct, run, and analyze tests and enables the business to explore and exploit new features in a cost-effective and controlled way. Know when to use techniques—stratified random sampling, interleaving, and metric sensitivity analysis—that let you work faster, more accurately, and more cost-effectively. With practical strategies and hands-on engineering tasks oriented around improving the rate and quality of testing on a product, you can apply what you've learned to optimize your experimentation practices. A/B testing is vital to product development. It’s time to create the tools and environment that let you run these tests easily, affordably, and reliably.
show moreMachine Learning in Elixir
Sean Moriarity
Stable Diffusion, ChatGPT, Whisper - these are just a few examples of incredible applications powered by developments in machine learning. Despite the ubiquity of machine learning applications running in production, there are only a few viable language choices for data science and machine learning tasks. Elixir's Nx project seeks to change that. With Nx, you can leverage the power of machine learning in your applications, using the battle-tested Erlang VM in a pragmatic language like Elixir. In this book, you'll learn how to leverage Elixir and the Nx ecosystem to solve real-world problems in computer vision, natural language processing, and more. The Elixir Nx project aims to make machine learning possible without the need to leave Elixir for solutions in other languages. And even if concepts like linear models and logistic regression are new to you, you'll be using them and much more to solve real-world problems in no time. Start with the basics of the Nx programming paradigm - how it differs from the Elixir programming style you're used to and how it enables you to write machine learning algorithms. Use your understanding of this paradigm to implement foundational machine learning algorithms from scratch. Go deeper and discover the power of deep learning with Axon. Unlock the power of Elixir and learn how to build and deploy machine learning models and pipelines anywhere. Learn how to analyze, visualize, and explain your data and models. Discover how to use machine learning to solve diverse problems from image recognition to content recommendation - all in your favorite programming language. What You Need: You'll need a computer with a working installation of Elixir v1.12 and Erlang/OTP 24. For some of the more compute intensive examples, you'll want to use EXLA, which currently only supports x86-64 platforms. While not explicitly required, some examples will demonstrate programs running on accelerators such as CUDA/ROCm enabled GPUs and Google TPUs. Most of these programs will still run fine on a regular CPU, just for much longer periods of time.
show moreProgramming Machine Learning
Paolo Perrotta
You've decided to tackle machine learning - because you're job hunting, embarking on a new project, or just think self-driving cars are cool. But where to start? It's easy to be intimidated, even as a software developer. The good news is that it doesn't have to be that hard. Master machine learning by writing code one line at a time, from simple learning programs all the way to a true deep learning system. Tackle the hard topics by breaking them down so they're easier to understand, and build your confidence by getting your hands dirty. Peel away the obscurities of machine learning, starting from scratch and going all the way to deep learning. Machine learning can be intimidating, with its reliance on math and algorithms that most programmers don't encounter in their regular work. Take a hands-on approach, writing the Python code yourself, without any libraries to obscure what's really going on. Iterate on your design, and add layers of complexity as you go. Build an image recognition application from scratch with supervised learning. Predict the future with linear regression. Dive into gradient descent, a fundamental algorithm that drives most of machine learning. Create perceptrons to classify data. Build neural networks to tackle more complex and sophisticated data sets. Train and refine those networks with backpropagation and batching. Layer the neural networks, eliminate overfitting, and add convolution to transform your neural network into a true deep learning system. Start from the beginning and code your way to machine learning mastery. What You Need: The examples in this book are written in Python, but don't worry if you don't know this language: you'll pick up all the Python you need very quickly. Apart from that, you'll only need your computer, and your code-adept brain.
show moreGenetic Algorithms and Machine Learning for Programmers
Frances Buontempo
Self-driving cars, natural language recognition, and online recommendation engines are all possible thanks to Machine Learning. Now you can create your own genetic algorithms, nature-inspired swarms, Monte Carlo simulations, cellular automata, and clusters. Learn how to test your ML code and dive into even more advanced topics. If you are a beginner-to-intermediate programmer keen to understand machine learning, this book is for you. Discover machine learning algorithms using a handful of self-contained recipes. Build a repertoire of algorithms, discovering terms and approaches that apply generally. Bake intelligence into your algorithms, guiding them to discover good solutions to problems. In this book, you will: Use heuristics and design fitness functions. Build genetic algorithms. Make nature-inspired swarms with ants, bees and particles. Create Monte Carlo simulations. Investigate cellular automata. Find minima and maxima, using hill climbing and simulated annealing. Try selection methods, including tournament and roulette wheels. Learn about heuristics, fitness functions, metrics, and clusters. Test your code and get inspired to try new problems. Work through scenarios to code your way out of a paper bag; an important skill for any competent programmer. See how the algorithms explore and learn by creating visualizations of each problem. Get inspired to design your own machine learning projects and become familiar with the jargon. What You Need: Code in C++ (>= C++11), Python (2.x or 3.x) and JavaScript (using the HTML5 canvas). Also uses matplotlib and some open source libraries, including SFML, Catch and Cosmic-Ray. These plotting and testing libraries are not required but their use will give you a fuller experience. Armed with just a text editor and compiler/interpreter for your language of choice you can still code along from the general algorithm descriptions.
show moreVector Search with JavaScript
Ben Greenberg
Cut through the complexity and apply AI-driven vector search strategies to deliver smarter, more intuitive search experiences that keep users engaged. Make search results smarter and more useful for everyday users and deliver more relevant results with vector search. Go beyond keyword matching to build search experiences that understand meaning, context, and similarity. Use AI-powered techniques to create recommendation systems, personalized search, and content discovery tools. Implement vector search from the ground up with step-by-step guidance, real-world examples, and hands-on coding. Generate embeddings, construct vector indexes, and optimize search accuracy with practical methods that integrate seamlessly into JavaScript applications. Whether refining an existing project or developing a new one, unlock the power of AI-driven search to create smarter, more intuitive user experiences. Stop relying on outdated search methods. Deploy vector search and deliver smarter, more intuitive search experiences that keep users engaged. This comprehensive guide takes a deep dive into the world of vector search, offering a hands-on approach for developers looking to bring AI-powered utility and precision into their projects. This book demystifies the core concepts of vector search, making them accessible and practical -- and you don't need a background in math to learn vector search techniques! Revolutionize search with AI-powered techniques that go beyond simple keyword matching. Implement vector search to build applications that understand intent, meaning, and similarity. Generate embeddings, construct efficient vector indexes, and power recommendation systems, personalized search, and content discovery tools. Master practical techniques to integrate vector search into JavaScript applications with real-world examples and step-by-step tutorials. Cut through the complexity and apply AI-driven search strategies to create better user experiences. Use vector search to return more relevant results, surface hidden insights, and handle ambiguous queries with greater precision. Build scalable, high-performance search systems that enhance products across industries, from e-commerce and media to finance and healthcare. What You Need: To get the most out of this book, you'll need a basic understanding of JavaScript and Node.js, as all examples are written in this language. While familiarity with data structures and algorithms is helpful, these concepts are explained in the book for those who need a refresher. Experience with command-line interfaces (CLI) and the terminal will also be useful as you work through the examples.
show moreA Common-Sense Guide to Data Structures and Algorithms in Python, Volume 2
Jay Wengrow
Want to write code that pushes the boundaries of speed, space savings, and scalability? Then you need more advanced data structures and algorithms. Go beyond Big O notation and evaluate the true efficiency of each algorithm you design. Pull out data structures such as B-trees, bit vectors, and Bloom filters to wrangle big data. Wield techniques like caching, randomization, and fingerprinting to tame even the most demanding applications. With simple language, clear diagrams, and practice exercises and solutions, this book makes these topics easy to grasp. Go beyond the basics and use these next-level concepts to build software that's ready to take on the challenges of the real world. The applications you write get more complex by the day. To keep up, you need to ensure your knowledge and techniques grow, too. A mastery of data structures and algorithms lets you write software more quickly; software that works, performs, and scales. Volume 2 of the series takes your knowledge of data structures and algorithms to the next level. With this practical and easy-to-understand guide, you'll create software that can tackle today's challenging problems head on. This Python edition uses Python exclusively for all code examples, exercises, and solutions. Benchmark your Python code to learn its true speed. Design fast and elegant solutions by connecting different data structures together. Use Monte Carlo algorithms to push the limits of your application's speed and memory savings in surprising ways. Wrangle big data with B-trees and other specialized algorithms. Design efficient algorithms by cleverly sprinkling in a bit of randomization. Cram tons of data into tiny bit vectors and Bloom filters. And leverage caching to make your software blazingly fast. Learn these sophisticated techniques and create great software that meets today's challenges. What You Need: To explore and execute the book's code, you'll need your favorite text editor and an environment that can run Python 3. While you needn't have read Volume 1 of this book to understand the current volume, you do need to be familiar with the concepts discussed there.
show moreProcess Over Magic: Beyond Vibe Coding
Uberto Barbini
A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1
Jay Wengrow
p>If you thought data structures and algorithms were all just theory, you're missing out on what they can do for your Python code. Learn to use Big O notation to make your code run faster by orders of magnitude. Choose from data structures such as hash tables, trees, and graphs to increase your code's efficiency exponentially. With simple language and clear diagrams, this book makes this complex topic accessible, no matter your background. Every chapter features practice exercises to give you the hands-on information you need to master data structures and algorithms for your day-to-day work. Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more efficiently, which is particularly important for today's web and mobile apps. Take a practical approach to data structures and algorithms, with techniques and real-world scenarios that you can use in your daily production code. The Python edition uses Python exclusively for all code examples, exercise, and solutions. Use Big O notation to measure and articulate the efficiency of your code, and modify your algorithm to make it faster. Find out how your choice of arrays, linked lists, and hash tables can dramatically affect the code you write. Use recursion to solve tricky problems and create algorithms that run exponentially faster than the alternatives. Dig into advanced data structures such as binary trees and graphs to help scale specialized applications such as social networks and mapping software. You'll even encounter a single keyword that can give your code a turbo boost. Practice your new skills with exercises in every chapter, along with detailed solutions. Use these techniques today to make your Python code faster and more scalable.
show morePractical A/B Testing
Leemay Nassery
Whether you're a catalyst for organizational change or have the support you need to create an engineering culture that embraces A/B testing, this book will help you do it right. The step-by-step instructions will demystify the entire process, from constructing an A/B test to breaking down the decision factors to build an engineering platform. When you're ready to run the A/B test of your dreams, you'll have the perfect blueprint. With smart, tactful approaches to orchestrating A/B testing on a product, you'll quickly discover how to reap all the benefits that A/B testing has to offer - benefits that span your users, your product, and your team. Take the reins today, and be the change you want to see in your engineering and product organizations. Develop a hypothesis statement that's backed with metrics that demonstrate if your prediction for the experiment is correct. Build more inclusive products by leveraging audience segmentation strategies and ad-hoc post analysis to better understand the impact of changes on specific user groups. Determine which path is best for your team when deciding whether to go with a third-party A/B test framework or to build the A/B testing platform in-house. And finally, learn how to cultivate an experimentation-friendly culture within your team. Leverage the A/B testing methodology to demonstrate the impact of changes on a product to your users, your key business metrics, and the way your team works together. After all, if you aren't measuring the impact of the changes you make, how will you know if you're truly making improvements?
show moreDesigning Data Governance from the Ground Up
Lauren Maffeo
Businesses own more data than ever before, but it's of no value if you don't know how to use it. Data governance manages the people, processes, and strategy needed for deploying data projects to production. But doing it well is far from easy: Less than one fourth of business leaders say their organizations are data driven. In Designing Data Governance from the Ground Up, you'll build a cross-functional strategy to create roadmaps and stewardship for data-focused projects, embed data governance into your engineering practice, and put processes in place to monitor data after deployment. In the last decade, the amount of data people produced grew 3,000 percent. Most organizations lack the strategy to clean, collect, organize, and automate data for production-ready projects. Without effective data governance, most businesses will keep failing to gain value from the mountain of data that's available to them. There's a plethora of content intended to help DataOps and DevOps teams reach production, but 90 percent of projects trained with big data fail to reach production because they lack governance. This book shares six steps you can take to build a data governance strategy from scratch. You'll find a data framework, pull together a team of data stewards, build a data governance team, define your roadmap, weave data governance into your development process, and monitor your data in production Whether you're a chief data officer or individual contributor, this book will show you how to manage up, get the buy-in you need to build data governance, find the right colleagues to co-create data governance, and keep them engaged for the long haul.
show moreServerless Apps on Cloudflare
Ashley Peacock
Use serverless technologies to build applications that scale, more quickly and easily, and without worrying about deployment. Whether you're writing an API, a full-stack app, or real-time code, harness the power of serverless on Cloudflare's platform so you can focus on what you do best: delivering solutions. With hands-on instruction and code samples throughout, you'll go from building a simple API to analyzing images with AI. And, when it's time to launch, you'll learn how to deploy your applications and websites automatically, and how to optimize their performance for production. For decades, applications have been built and deployed in a similar way: you write code, provision a server, and upload your code. Over the years, you've graduated from FTP or SSH to Docker and Kubernetes, but fundamentally you've just switched from owning to renting; you're paying 24/7 for the server hosting your app. Serverless technologies change that model. With serverless, you focus on writing code, and not how it's deployed. You only pay for when your application code is executed, rather than paying for idle servers. In this book we'll use Cloudflare, which was built from the ground up to be a serverless platform, but the same concepts apply to every serverless provider. With this book, you'll learn a better way to build applications, and you'll see improved productivity and ease of deployment. From secrets to dependencies, such as databases and caches, Cloudflare has revolutionized how to build applications, and has made building applications easier and more fun. As you go through the book, you'll learn in detail what serverless is, how it functions behind the scenes, and how to build serverless applications on Cloudflare. When you finish this book, you'll understand how to think in terms of serverless functions, and you'll have the experience of deploying and extending these apps as you work through the examples. What You Need: Mac or PC GitHub account (free) Cloudflare account (free)
show moreGenetic Algorithms in Elixir
Sean Moriarity
From finance to artificial intelligence, genetic algorithms are a powerful tool with a wide array of applications. But you don't need an exotic new language or framework to get started; you can learn about genetic algorithms in a language you're already familiar with. Join us for an in-depth look at the algorithms, techniques, and methods that go into writing a genetic algorithm. From introductory problems to real-world applications, you'll learn the underlying principles of problem solving using genetic algorithms. Evolutionary algorithms are a unique and often overlooked subset of machine learning and artificial intelligence. Because of this, most of the available resources are outdated or too academic in nature, and none of them are made with Elixir programmers in mind. Start from the ground up with genetic algorithms in a language you are familiar with. Discover the power of genetic algorithms through simple solutions to challenging problems. Use Elixir features to write genetic algorithms that are concise and idiomatic. Learn the complete life cycle of solving a problem using genetic algorithms. Understand the different techniques and fine-tuning required to solve a wide array of problems. Plan, test, analyze, and visualize your genetic algorithms with real-world applications. Open your eyes to a unique and powerful field - without having to learn a new language or framework. What You Need: You'll need a macOS, Windows, or Linux distribution with an up-to-date Elixir installation.
show moreWeb Development with ReasonML
J. David Eisenberg
ReasonML is a new, type-safe, functional language that compiles to efficient, readable JavaScript. ReasonML interoperates with existing JavaScript libraries and works especially well with React, one of the most popular front-end frameworks. Learn how to take advantage of the power of a functional language while keeping the flexibility of the whole JavaScript ecosystem. Move beyond theory and get things done faster and more reliably with ReasonML today. ReasonML is a new syntax for OCaml, a battle-tested programming language used in industry for over 20 years. Designed to be familiar to JavaScript programmers, ReasonML code compiles to highly readable JavaScript. With ReasonML, you get OCaml's powerful functional programming features: a strong static type system with an excellent type inference engine, pattern matching, and features for functional programming with immutable variables. ReasonML also allows flexibility with opt-in side effects, mutation, and object-oriented programming. ReasonML hits the sweet spot between the pure theoretical world and the laissez-faire approach of JavaScript. Start using ReasonML's powerful type system as you learn the essentials of the language: variables and arithmetic operations. Gain expressive power as you write functions with named parameters and currying. Define your own data types, and integrate all these capabilities into a simple web page. Take advantage of ReasonML's functional data structures with map and reduce functions. Discover new ways to write algorithms with ReasonML's recursion support. Interoperate with existing JavaScript libraries with bindings, and write reactive web applications using ReasonML in tandem with React. Reinforce concepts with examples that range from short, tightly focused functions to complete programs, and practice your new skills with exercises in each chapter.With ReasonML, harness the awesome power of a functional language while retaining the best features of JavaScript to produce concise, fast, type-safe programs. What You Need: You'll need to have node.js (version 10.0 or above) and npm (version 5.6 or above). Once you install the bs-platform package and fire up a text editor, you're ready to go. (There are plugins for many popular editors that will make editing easier.)
show moreA Common-Sense Guide to AI Engineering
Jay Wengrow
Build robust LLM-powered apps, chatbots, and agents while mastering AI engineering principles that will help you outlast the tools and the hype. Want to build an LLM-powered app but don't know where to begin? With this step-by-step guide, you can master the underlying principles of AI engineering by building an LLM-powered app from the ground up. Tame unpredictable models with prompt and context engineering. Use evals to keep them on track. Give chatbots the knowledge to answer anything a user wants to know. Equip agents with the tools and smarts to actually get the job done. By the end, you'll have the intuition and the confidence to build on top of LLMs in the real world. Fragmented documentation, obsolete tutorials, and frameworks that deliver a prototype but flop in production can make AI engineering feel overwhelming. But it doesn't have to be that way. With real-world code and step-by-step instructions as your guide, you can learn to build robust LLM-powered apps from the ground up while mastering both the how and why of the most crucial underlying concepts. Harness context engineering and retrieval systems to create AI assistants that understand your proprietary data. Create chatbots that answer organization-specific questions and help solve users' issues. Design agents that conduct research, make decisions, and take action in the real world. Level up your prompt engineering and get an LLM to do your bidding---not its own. Use automated evals to keep constant tabs on your app's quality while setting up guardrails to protect your users and organization. And implement observability systems that make it easy to debug your app when things do go wrong. With a systematic approach grounded in the core principles of building AI apps for real users, you'll easily evolve and adapt even as the hype and tools come and go.
show morePandas Brain Teasers
Miki Tebeka
This book contains 25 short programs that will challenge your understanding of Pandas. Like any big project, the Pandas developers had to make some design decisions that at times seem surprising. This book uses those quirks as a teaching opportunity. By understanding the gaps in your knowledge, you'll become better at what you do. Some of the teasers are from the author's experience shipping bugs to production, and some from others doing the same. Teasers and puzzles are fun, and learning how to solve them can teach you to avoid programming mistakes and maybe even impress your colleagues and future employers. Working with data is central to nearly everything we do, from disease contact tracing and analyzing health records to smart meters that track utility consumption behavior. With the power of Python's pandas library, you can process and analyze this data in a highly efficient and simple-to-understand way. And with 25 brain teasers designed to turn this technology's quirks into a teaching opportunity, you'll be honing your data science skills while having fun at the same time. Following a simple format, you'll challenge yourself and your understanding of pandas. Read a short Python program that uses pandas, try to guess the output, run the code yourself, and then go to the next page for an explanation of the solution. From common pitfalls and hidden gotchas to unexpected twists and turns, you'll deepen your understanding of pandas, learn to write more efficient code, and reduce the number of bugs in the software you develop. You may even impress your colleagues and your employers, both present and future. Learn the tricks of the trade with Python's pandas, in one of the most fun and creative ways around. What You Need: To run the code you'll need Python version 3.8 or upper and Pandas version 1.0 or upper installed. We use Python version 3.8.3 and Pandas version 1.0.5; the output might change in future versions.
show more