Leanpub Header

Skip to main content

Filters

Category: "Computer Programming/Artificial Intelligence/Python"

Computer Programming/Artificial Intelligence/Python

New to Artificial Intelligence? Read the Artificial Intelligence article

  1. How Transformers Actually Work
    How Transformers Actually Work
    From First Principles to Production Inference
    Steve Publications

    Go beyond calling transformer libraries and learn what actually happens under the hood. Starting from first principles, this book builds transformers from scratch with NumPy and PyTorch, then takes you through training, optimization and production inference. Along the way, you’ll work through the math, code and practical techniques behind modern transformer systems.

  2. Production-Grade Python, LangChain & LangGraph
    Production-Grade Python, LangChain & LangGraph
    A deployment-first handbook for developers who know Python syntax but have not shipped Python
    Fiodar Sazanavets

    AI engineering is becoming one of the most valuable and in-demand areas of software development, and Python, LangChain, and LangGraph are core skills for building the systems behind it. Learn how to turn basic Python knowledge into production-grade backend and agentic AI applications—and move toward an engineering niche centered on building and controlling AI rather than competing with it.

  3. Running Local LLMs on Your Own Hardware
    Running Local LLMs on Your Own Hardware
    A Practical Guide to Private, Offline, and Self-Hosted Large Language Models
    Yohan J. Rodríguez

    A hands-on guide to downloading, running, serving, and maintaining open-weight LLMs on your own machine (492 manuscript pages).

  4. AI for Financial Risk, Compliance and Regulatory Reporting
    AI for Financial Risk, Compliance and Regulatory Reporting
    Production Systems and Architecture for Modern Banking
    Sreedhara Reddy Kotha

    A £4.1M PRA compliance failure. A fictional bank called Avon & Wessex. Sixteen chapters and 23 systems showing exactly how to build production-grade, auditable AI for credit, market, operational and liquidity risk, model governance, and regulatory reporting — the practitioner's guide UK banking has been missing.

  5. Production NLP with spaCy
    Production NLP with spaCy
    A Comprehensive Guide to Building Production-Ready NLP Systems
    Steve Publications

    If you want to build real NLP applications instead of just experimenting with notebooks, spaCy is one of the best places to start. This book walks you through the entire journey from the fundamentals to advanced production workflows with practical explanations, real code examples and hands-on projects that show you how to build fast, reliable NLP systems for the real world.

  6. AI TOOLS FOR NEW DEVELOPER
    AI TOOLS FOR NEW DEVELOPER
    Start Using GPT-6, Claude & Cursor the Right Way
    Anshuman Mishra

    AI can speed up learning and coding — but only if you stay in control. This book shows new developers how to use GPT-6, Claude, and Cursor effectively: how to ask clear questions, supply useful context, review generated code, test edge cases, and avoid common mistakes such as invented APIs, insecure suggestions, and overconfident explanations. You will build practical habits for explanations, small features, tests, debugging, and documentation — while protecting private data and remaining responsible for the final result. Ideal for students, self-learners, and early-career developers who want to learn with AI, not instead of learning.

  7. AI API Security Scanner: Build It From Scratch

    Every web application has security headers, cookies, TLS configurations, and CORS policies that need to be correct. Most teams find out they're wrong only after a penetration test — or worse, after an incident. This book shows you how to build a scanner that catches these issues automatically. You'll create a Python CLI tool that uses Hurl (declarative HTTP testing) to assert security properties, SSLyze to validate TLS protocol versions, and AI to generate specific remediation for every failure it finds. The output: structured JSON reports, visual HTML dashboards, and AI-generated security posture assessments. **What you'll build:** - 9 declarative Hurl security test files (headers, cookies, CORS, HSTS, CSP, CSRF, redirects, TLS) - A preprocessor that handles domain substitution and authentication - An output parser with built-in remediation guidance for every test - A TLS scanner validating SSL 2.0/3.0 disabled and TLS 1.2/1.3 enabled - An AI analyzer that generates context-specific fixes using Ollama, OpenAI, or Bedrock - An HTML reporter with dark-themed visual dashboards - Docker multi-architecture deployment - CI/CD pipeline with GitHub Actions **Who this is for:** - Developers who want security checks before deploying - DevSecOps engineers building CI/CD security gates - Penetration testers who need quick baseline assessments - Security students learning web vulnerability concepts hands-on - Platform teams enforcing security standards across services Every failure includes: what was expected, what was received, why it matters, how to fix it, and a documentation link. AI adds domain-specific code examples on top.

  8. Building an AI Threat Modeling MCP Server

    Threat modeling is broken. It takes days, costs thousands, and most teams skip it entirely. What if your AI coding assistant could do it for you — systematically, consistently, and in minutes? This book shows you how to build an MCP server that makes it happen. You'll create 80+ structured tools that guide any AI assistant through a rigorous 9-phase STRIDE threat modeling workflow. Not vague prompts that produce unstructured text — real, typed, validated tools that build up a complete threat model piece by piece: business context, architecture, threat actors, trust boundaries, data flows, STRIDE-based threats, mitigations, and a final JSON export compatible with AWS Threat Composer. **What you'll build:** - A full MCP server with FastMCP (stdio + SSE transport) - Pydantic v2 data models for type-safe threat modeling - Case-insensitive enum validation (because AI isn't always consistent) - 11 tool modules covering every phase of STRIDE analysis - Customizable organization security guidelines loaded from `.md` files - Docker deployment for team-wide access - Compliance gap analysis that validates against mandatory controls - A complete workflow orchestrator with progress tracking **What makes this different:** The server doesn't call any LLM itself. It provides the structure and tools — your AI assistant (Claude, Kiro, Cursor, Copilot) provides the intelligence. This means it works with any model, any provider, forever. No API keys, no token costs for the server itself. **Who this is for:** - Security engineers who want to automate repetitive threat modeling - Python developers building MCP servers for any domain - DevSecOps teams embedding security into AI-assisted workflows - Architects who need consistent, auditable threat models - Anyone curious about how MCP tools work under the hood **By the end of this book**, you'll have a production-ready MCP server, a deep understanding of how AI tools are structured, and transferable patterns for building MCP servers in any domain — not just security.

  9. vLLM & SGLang: From First Request to Production

    vLLM and SGLang, side by side. Learn how LLM serving works, measure both engines fairly, tune them with evidence, and take a model from an empty GPU to a deployment with a cost per million tokens you can defend.

  10. Physics-Informed Machine Learning: A Practical Guide
    Physics-Informed Machine Learning: A Practical Guide
    Complete Edition — Foundations, Advanced Methods, and Applications
    Kompri Kompri

    A practical, code-first guide to physics-informed machine learning for scientists and engineers, now complete in one volume. Build your first PINN from scratch in PyTorch, then go further into hard constraints, Navier–Stokes, neural operators, inverse problems, uncertainty quantification, and real case studies in aerodynamics, materials, and biomedicine.

  11. Beyond "Ship and Pray"
    Beyond "Ship and Pray"
    Testing Agentic Systems with Geometric Ground Truth
    Agus Sudjianto and Wing Yan Lau

    An agent can score well on average and still fail exactly where it matters. Beyond “Ship and Pray” shows how to replace benchmark averages with designed experiments, geometric ground truth and failure attribution—so teams can discover when an agent breaks, identify the responsible component and test whether it fails safely under tool faults.

  12. Beyond "Prompt and Pray"
    Beyond "Prompt and Pray"
    Building Governed Agentic Systems with Geometric Memory and Verification A Practical Tutorial on Perception, Planning, Tools, Memory, Evaluation and Runtime Governance
    Agus Sudjianto and Wing Yan Lau

    A language model predicts tokens. An agent acts—and must be held accountable. Learn to replace “prompt and pray” with governed tools, geometric memory, independent verification and auditable runtime controls.

  13. LLM Quantization
    LLM Quantization
    From the Bits Up
    Hatem M.

    Anyone can run INT4 and read off the accuracy drop. This book explains why that number is what it is — building every quantization method from scratch, breaking it on purpose, and measuring the result. Quantization, from the bits up.

  14. Claude Code Masterclass
    Claude Code Masterclass
    Build Real-World Software with Claude Code, AI Workflows, and Hands-On Projects
    Luca Berton

    Learn Claude Code by building real projects. This hands-on companion turns the Claude Code Masterclass workshop into a practical self-paced guide for planning, coding, testing, reviewing, refactoring, and shipping software with AI.

  15. High-Performance Python for AI & Data Engineering
    High-Performance Python for AI & Data Engineering
    The Ultimate Loop, Vectorization & Memory Optimization Blueprint
    AhmedAdawy

    The ultimate technical blueprint for developers and AI engineers to strip away execution overhead, leverage hardware-accelerated NumPy/PyTorch operations, and scale Python code effortlessly