Concepts starting with I
258 concepts, each with a plain-language explanation, examples and diagrams. Pick a letter or open a concept.
- ID3 Decision Tree Learning — Decision tree learning searches for a tree that minimizes the relevant bound, but solving that search exactly is computationally…
- Identifiers and Variables — A variable names a memory location rather than being the data itself.
- Identifying Cargo Cult Engagements — The cargo-cult engagement diagnostic is a tool for identifying cargo-cult engagements by recognizing their pattern from the…
- Identifying Repeated Work Across Engagements — A pattern becomes a product feature through four stages: recurring engagements, a selected pattern, a generalized version…
- Identifying the Real Problem — A stated problem is how a person describes a problem, while the real problem is the genuine issue that needs addressing.
- Identity and Access in Agent Systems — A shared service account can compromise the compliance posture for material non-public information because reads run under an…
- Identity in System Design — A complete audit log is not sufficient for compliance if its entries cannot identify the human responsible for each read.
- If Statements — Ordinary program flow executes instructions in their sequence.
- if-else Statements — The if statement checks a condition and executes indented code only if that condition is true.
- Image Classification — The convnet progressively exchanges spatial detail for deeper feature representations.
- Image Classification Fundamentals — Transformer architectures are not only restricted to text inputs. The original vision transformer for classifying images is the…
- Image Classification with Deep Learning — A pretrained network is a saved network trained previously on a large dataset, such as ImageNet.
- Image Editing with Concept Vectors — A VAE combines an encoder, a sampling step, and a decoder.
- Image I/O in Java — An icon in Java GUI is represented by an object of type Icon, and Icon is an interface rather than a class.
- Image Observer — The Graphics class provides the methods that copy an image onto the screen or an off-screen canvas, most commonly from inside…
- IMDB and Reuters Text Classification Examples — One-hot encoding is a basic method for turning tokens into vectors.
- Immediate and Future Rewards — Discounting lets an agent compare rewards that arrive at different times.
- Immutability and Tuple Properties — Python compares tuples element-by-element from left to right, stopping at the first index where elements differ.
- Immutability and Tuples — Tuple assignment enables swapping two variables in one line: a, b = b, a
- Implementing a Compact Causal Attention Class — Dropout on attention weights randomly zeroes elements of the matrix to reduce overfitting during training; at a rate of 0.5…
- Implementing a Large Language Model Architecture — GPT-3 is fundamentally the same in model architecture as GPT-2; the main differences are scale and training data.
- Implementing a Stack with a Linked List — The size of a stack problem is measured by the number of items on the stack, which lets us ask how run time grows as the stack…
- Implementing a Stack with an Array — The size of a stack problem is measured by the number of items on the stack, which lets us ask how run time grows as the stack…
- Implementing a Tokenizer — Tokenization cuts text into individual tokens, and a new text sample is cut in the same way before any numbers are assigned.
- Implementing a Typical Training Loop for Neural Networks — model.train() and model.eval() place a model into training or evaluation mode, which matters for components such as dropout and…
- Implementing AI for Claims Processing — A bottleneck is a part of a process that limits the overall performance, so it is defined by its effect on the whole flow.
- Implementing Automated Evaluation: Scoring Model Responses — The generation loop visits each test entry, builds a prompt, calls generate, decodes the output, and cleans it so that only the…
- Implementing Byte Pair Encoding Tokenization — A token embedding is a vector representation of an input token, created in PyTorch with an Embedding layer.
- Implementing Dashboard Walk-throughs — A dashboard walk-through is valued for the conversation it makes possible, which aligns the FDE's next week of work with the…
- Implementing Event Listener Interfaces — A component that must react to input focus learns about changes through FocusEvent notifications.
- Implementing Interfaces in Java — A Java interface is a reserved word that introduces a set of instance method declarations with no implementations.
- Implementing Multi-Head Attention with Weight Splits — The current MultiHeadAttentionWrapper processes its heads sequentially through a list comprehension in the forward method.
- Implementing Self-Attention with Trainable Weights in Python — Self-attention with trainable weights keeps the basic idea of computing context vectors as weighted sums over input vectors…
- Implementing Setter Methods — A getter method provides read access to a variable by returning its current value to the caller.
- Implementing Softmax and Argmax for Class Labels — The exercise asks you to fine-tune the first output token and compare its predictive performance with fine-tuning the last…
- Implementing Token Embeddings — A token ID is an integer, and the embedding layer uses it as a key to retrieve one row of its weight matrix.
- Implementing Transformer Blocks in GPT Architecture — A TransformerBlock is a component that processes input data, and in this source's example it is called as output = block(x).
- Import Statements in Java — A package groups related classes, and it can also contain other packages, which gives Java a way to organize code at several…
- Importance of Customer Involvement in AI Projects — A cargo cult engagement has the title and vocabulary of a successful AI engagement but lacks the operating model that makes it…
- Importance of Training GPT Models — A transformer block is a core structural component of GPT models that combines masked multi-head attention modules with fully…
- Importance Sampling — Off-policy prediction separates the policy that generates experience from the policy whose value is estimated.
- Importing and Using Modules — Another method is to write the modules in the native language in which the Python interpreter itself was written. For example…
- Importing and Using Python Modules — json.loads() transforms a JSON string into native Python structures—lists and dictionaries—not a special JSON type.
- Importing and Using the Math Module — math.log10() computes base 10 logarithms, essential for decibels, pH scales, and other common logarithmic scales
- Importing Libraries in Python — The Python Package Index (PyPI) is a repository containing thousands of open source Python libraries.
- Importing modules — A module is a .py file containing functions and variables designed to be reused by other programs.
- Importing Specific Functions from Modules — An import statement tells Python to find a module file, execute its code, and make its contents available to your program.
- Improving AI Products through Iterative Development — The per-trace loop starts by reading individual sampled traces with their actual input and actual output, rather than the…
- Inception Modules — A layer graph can branch and merge, but it must remain acyclic except for processing internal to recurrent layers.
- Incremental averaging techniques from Chapter 2 — Incremental Monte Carlo prediction is organized episode by episode.
- Incremental Deployment of AI Solutions — A demo succeeds when it creates desire that leads to a contract, which means showing one valuable outcome clearly rather than…
- Incremental Dynamic Programming — Dynamic programming began as a broadly applicable problem-solving method associated with Bellman, not as a technique restricted…
- Incremental Monte Carlo Methods — The weighted average update rule incorporates a newly obtained return into an existing estimate.
- Incremental Updates for Action Values — A sample average is a natural estimate of an action value.
- Indentation and Code Blocks — A physical line is what appears in your editor; a logical line is what Python interprets as a single statement.
- Indentation and Code Blocks in Python — Python is case-sensitive: print and Print are different, and only print is the built-in output function.
- Independent and Identically Distributed Random Variables — Hoeffding's Inequality controls the probability of a large difference between a sample mean and the true mean.
- Independent Random Variables — Bennet's inequality bounds the probability of a large positive deviation by a sum of independent random variables.
- Independent Sampling — D is the distribution; z ∼ D describes sampling from it.
- Indexed Loops and Array Traversal — A for-each loop processes the values in an array, not the elements themselves, so assigning to the loop variable does not change…
- Indexing and Query Optimization — A database is justified only when your application needs frequent random updates on large datasets, must handle data larger than…
- Indexing and Slicing Collections — Tuples are immutable collections created using comma-separated values, optionally enclosed in parentheses. Once created, their…
- Indexing and Slicing Lists — The remove() method deletes the first occurrence of a value from a list when you know the value but not its index.
- Indexing and Slicing Sequences — Strings are restricted to character elements only and are immutable; lists can hold any object type and are mutable; tuples can…
- Indexing and Slicing Strings — len() is a built-in function that returns the number of items in its argument as an integer.
- Indexing and Slicing Tuples — Commas create tuples, not parentheses. Parentheses are optional and exist only for readability.
- Indexing Into Two-Dimensional Arrays — Java does not have true two-dimensional arrays. A two-dimensional array is an array whose elements are one-dimensional arrays.
- Indexing Lists with the Index Operator — List slicing uses the syntax t[start:stop] to extract a portion of a list, where start is included and stop is excluded.
- Indexing Strings to Access Individual Characters — len() is a built-in Python function that counts and returns the total number of characters in a string.
- Inductive Bias — Finite hypothesis classes provide a controlled candidate set for ERM.
- Inference-Time Prediction — Model ensembling pools outputs from multiple models rather than relying on one model.
- Information Bottleneck Method — Mutual information I(X;Y) measures dependence between two random variables.
- Information Leakage — The test set should not be used to guide model calibration.
- Information Theory for Machine Learning — Mutual information I(X;Y) measures dependence between two random variables.
- Inheritance — Inheritance is a way for one class to reuse another class's behavior by becoming a sub-type of it -- implementing a type/subtype…
- Inheritance and Class Extension — super() is a special syntax that calls a method from the parent class. In the context of __init__, super().__init__() ensures…
- Inheritance and Code Reuse — An object bundles data (attributes) and behavior (methods) into a single, organized unit.
- Inheritance and Polymorphism — Procedure-oriented programming centers on functions that manipulate data, keeping data and logic separate; object-oriented…
- Inheritance in Java — Java does not support multiple inheritance, a deliberate choice to keep the language reasonably simple.
- Inheritance in Object-Oriented Programming — A subclass such as Car inherits the properties and behaviors of its superclass Vehicle.
- Initializing Larger GPT Models — The GPTModel class builds several GPT-2 sizes, and only the configuration file needs to change between them.
- Initializing Objects with __init__ — An object bundles data (attributes) and behavior (methods) into a single, organized unit.
- Initializing the 124-Million-Parameter GPT Model — The GPTModel class builds several GPT-2 sizes, and only the configuration file needs to change between them.
- Inner Classes — A non-static nested class is logically attached to each containing object, so it can reach that object's instance variables and…
- Inner Classes in Java — A static nested class is a class declared inside another class with the static modifier, and it is part of the static structure…
- Input and Output Readers and Writers in Java — I/O is the interaction of a program with the rest of the world, and it is essential for any useful program.
- Input Representation in Language Models — The transformer is the architecture that LLMs use to process their input.
- Input Validation and Error Recovery — Overtime pay requires applying a 1.5x multiplier only to hours worked above 40; the calculation path diverges at this threshold.
- Input Validation and Sanitization — Defensive programming means asking 'What could go wrong?' before your program reaches users.
- Input Validation and Type Conversion — Collect all numbers from the user into a list using a while loop that terminates when the user enters a sentinel value like…
- Input Windows and Batch Creation — Stride is the number of positions by which the input window shifts when the next batch is created from an input dataset.
- INSERT Statement Syntax and Options — Role normalization separates role information into a dedicated Role table, eliminating redundancy and centralizing role…
- INSERT Statements and Data Entry — last_insert_rowid() is a built-in SQLite function that returns the ID of the most recently inserted row in your current database…
- Inserting and Querying Data — Databases require you to declare column names and data types before creating a table, unlike Python lists or dictionaries which…
- Inserting and Retrieving Data with SQL — A database connection is established using sqlite3.connect(filename), which creates a link to a local database file or remote…
- Inserting Data into Tables — DROP TABLE IF EXISTS safely removes a table and allows scripts to run repeatedly without errors.
- Inserting Data with INSERT INTO — A primary key is a unique integer identifier (conventionally named 'id') that uniquely identifies each row within a table.
- Inserting Data with INSERT: Adding New Rows — DELETE removes rows from a table; the WHERE clause specifies which rows to delete.
- Inserting Data with INSERT: Adding Rows to a Table — SELECT retrieves specific columns and rows from a database table using WHERE to filter and ORDER BY to sort results.
- Inserting Nodes into a Linked List — Traversal moves through a linked list by following next pointers from the head until null is reached.
- Inspecting Model Architecture Settings — Downloading a file from a URL in Python uses urllib.request.urlretrieve, which takes the address and a local filename; the…
- Inspecting Model Parameters — The total number of trainable parameters is the sum of numel() over every parameter whose requires_grad attribute is True.
- Inspecting the Pretrained GPT-2 Parameter Dictionary — assign compares the shapes of the destination and proposed value, raises a ValueError on a mismatch, and otherwise returns the…
- Installing a GPU-Compatible Version of PyTorch — A device is where computations occur and data resides, and the CPU and the GPU are both examples of devices.
- Installing and Launching Eclipse — A workspace is the directory where your work is stored, and you can use several workspaces and choose one at startup.
- Installing Python and Setting Up Your Environment — The Python Package Index (PyPI) is a repository containing thousands of open source Python libraries.
- Installing Python on GNU/Linux — Verification confirms that Python is installed on your Mac and accessible from the terminal.
- Installing Python on Mac OS X — Verification confirms that Python is installed on your Mac and accessible from the terminal.
- Installing Python on Windows — Windows does not include the zip command by default; download and install it from the GnuWin32 project page
- Installing Python on Your Computer — Notepad and other basic text editors are unsuitable for Python because they lack syntax highlighting and do not support…
- Installing Python on Your System — Windows users should download the "self-installing executable" from http:// www.vim.org/download.php
- Installing PyTorch — Many scientific computing libraries do not immediately support the newest version of Python, so the latest release is not always…
- Installing Third-Party Libraries with pip — Download Python from https://www.python.org/downloads/ only—this is the official, authoritative source
- Instance and Class Attributes — __init__ is a special method that runs automatically when an object is instantiated, marking the beginning of the object's…
- Instance Attributes and Methods — The other method named party . The methods all have a special first parameter that we name by convention self . The first…
- Instance Methods and Object State — An instance variable can receive an initial value directly in its declaration, such as public int die1 = 3;, and that value is…
- Instance Variables and Class Design — A class definition is recursive when an instance variable inside it can refer to another object of the same class type.
- Instance Variables and Instance Methods — A variable holding null does not refer to any object. Null is the actual value stored in the variable, so the variable is null…
- Instance Variables and Methods — A constructor has the same name as its class, has no return type, and initializes an object when it is created.
- Instance Variables and Object State — A static class member, such as playerCount, belongs to the class itself and is stored as part of the class representation in…
- Instance Variables vs. Class Variables — A list is an example of usage of objects and classes. When we use a variable i and assign a value to it, say integer 5 to it…
- Instruction Dataset Preparation — Instruction fine-tuning is a three-stage process: preparing the dataset, fine-tuning the LLM, and evaluating the LLM.
- Instruction Datasets for Fine-Tuning — Instruction fine-tuning adapts a pretrained LLM to follow human instructions and generate desired responses.
- Instruction Fine-tuning — The general process of creating an LLM has two stages: pretraining, which trains on a large, diverse dataset to build a broad…
- Instruction Fine-Tuning Basics — Evaluating an instruction-fine-tuned LLM checks whether tuning changed the model's performance.
- Instruction Fine-Tuning Summary — Preparing a dataset for fine-tuning involves three activities: downloading an instruction-response dataset, formatting its…
- Instruction Fine-Tuning Test Datasets — The generation loop visits each test entry, builds a prompt, calls generate, decodes the output, and cleans it so that only the…
- Instruction Fine-Tuning Workflow — The Alpaca dataset is an openly shared instruction dataset of 52,002 entries, roughly fifty times larger than the earlier…
- Instrumental Conditioning — Classify conditioning by asking whether reinforcement depends on behavior.
- Instrumental Conditioning and Reinforcement Learning — Instrumental conditioning links a behavior to its consequence.
- Instrumenting AI Systems from the First Commit — The customer dashboard should be live and visible from the day the system enters production, not added later.
- Integer Division and Truncation — The modulus operator checks divisibility: x % y == 0 means x is divisible by y.
- Integers and Floating-Point Numbers — In Python 3, the / operator always returns a float, even when dividing two integers—a significant change from Python 2.
- Integrating Customer Feedback into Product Development — Founders of early-stage vertical AI startups can be too close to the technology to see what customers are actually telling them.
- Integration Points in AI Deployments — A deployment architecture answer covers more than the model and its prompt; the source names the model-first answer as the weak…
- Interactive Mode: Running Python Code Line by Line — Running a Python script means telling the Python interpreter to read and execute code from a file, rather than typing code…
- Interface Implementation — A default method is a method with an implementation in an interface, marked with the default keyword, and classes that implement…
- Interface Type — An interface can be the base type of an array, as in Strokeable[] listOfFigures, and its elements can refer to any objects whose…
- Interfaces in Java — A functional interface is a Java file that holds a specification for exactly one subroutine, and it is defined in a .java file…
- Interfacing Python with Other Languages — Python is a language specification; a Python implementation is the software that executes code written in that language.
- Internet Connection Technologies — The Internet is a worldwide network containing millions of connected computers.
- Interpreted nature — A characteristic of Python that, alongside its syntax and dynamic typing, makes it ideal for scripting and rapid application…
- Interpreters vs. Compilers: How Python Translates Your Code — The CPU understands only machine language, represented in zeros and ones. High-level languages like Python are invisible to the…
- Interpreters: Translating Code Line by Line — A compiler translates an entire program from high-level source code to machine language in one complete pass, then saves the…
- Interpreting Deep Learning Models — Visualization makes convnet learning and classification decisions easier to inspect.
- Interpreting Training Curves — Training and validation loss are plotted against epochs, and each line is drawn only from its own list of values.
- Interventions and Counterfactuals in Probabilistic Graphical Models — Off-policy learning separates the policy that gathers experiences from the policy being learned.
- Introduction to Actor-Critic Algorithms — The actor-critic design has two components with different learning roles.
- Introduction to Algorithms — Determinism is the property that identical inputs always produce identical outputs in a computer program—this is expected and…
- Introduction to APIs and Web Services — API keys can be included in requests via two methods: as a URL query parameter or as part of POST data.
- Introduction to Arrays — An array type is the base type followed by a pair of empty square brackets, such as int[] or String[].
- Introduction to Artificial Neural Networks — Feedforward describes the absence of loops in an ANN's connections.
- Introduction to BeautifulSoup — Tag inspection in BeautifulSoup means accessing the individual components of a Tag object: its attributes (via get() or attrs)…
- Introduction to Built-in Functions — len() is a built-in function that returns the number of items in its argument as an integer.
- Introduction to Clustering — Clustering must balance keeping similar elements together with keeping dissimilar elements apart.
- Introduction to Conditional Statements — Overtime pay requires applying a 1.5x multiplier only to hours worked above 40; the calculation path diverges at this threshold.
- Introduction to Control Flow Statements — A statement is a unit of code that the Python interpreter can execute—code that causes the interpreter to perform an action.
- Introduction to Convolutional Neural Networks — Convolution focuses on local patches rather than treating the entire image as one undivided pattern.
- Introduction to D3.js and Data Visualization — Visualizing a network graph requires running spjson.py to convert your PageRank database into JSON data, then opening force.html…
- Introduction to Database Normalization — Redundancy occurs when the same information is stored multiple times across different rows in a table, such as repeating an…
- Introduction to Databases and SQL — Main memory (CPU and RAM) is where programs execute and store data while running, but it is volatile—everything is erased when…
- Introduction to Deep Learning — Machine learning development is presented through a timeline.
- Introduction to Dictionaries — Dictionaries outperform lists and variables for character counting because they only allocate space for characters that actually…
- Introduction to Email Archive Processing — Three Python scripts (gbasic.py, gword.py, gline.py) each answer a different question about email participation: who sent the…
- Introduction to Error Handling — ValueError is a runtime error that occurs when type conversion fails—for example, when int() tries to convert a string like…
- Introduction to Exception Handling with try and except — Attempting to open a non-existent file raises a FileNotFoundError and prevents the program from obtaining a file handle.
- Introduction to Expressions — Most statements (logical lines) that you write will contain expressions . A simple example of an expression is 2 + 3 . An…
- Introduction to Feature Engineering — Traditional machine learning relies on human experts to manually extract features, such as trigger-word frequency in spam…
- Introduction to Feedforward Neural Networks — A neural network architecture is specified by (V, E, σ), consisting of the graph and the activation function.
- Introduction to For-each Loops for Array Processing — A for-each loop processes the values in an array, not the elements themselves, so assigning to the loop variable does not change…
- Introduction to Formatted String Literals — Multiple expressions can be embedded in a single f-string by placing each one inside curly braces; Python evaluates them from…
- Introduction to Functions — A function is a named block of statements that you can call and reuse anywhere in your program, any number of times.
- Introduction to Functions and Return Values — Initialize the extreme variable to None before the loop to mark it as empty.
- Introduction to Geocoding APIs — SQLite serves as a local cache to store geocoding results, preventing redundant API calls to the same locations.
- Introduction to gmodel.py and Data Processing — Email addresses and domain names change over time as people move between organizations, requiring a mapping system to…
- Introduction to Graphics2D — A transparent color is a Color object created with an alpha component, which controls its opacity; an ordinary three-argument…
- Introduction to GUI Programming — SimpleGraphicsStarter.java is the text's first example of a GUI program, meaning a program whose result is a graphical interface…
- Introduction to GUI Programming in Python — Python has no single standard GUI tool; the choice depends on your specific project constraints rather than a universal best…
- Introduction to GUI Programming with Swing — GUIDemo.java is a simple demonstration of some basic GUI components from the Swing graphical user interface library.
- Introduction to if Statements — Notice that Python gives you the output of the line immediately! What you just entered is a single Python statement . We use…
- Introduction to Inheritance — One of the major benefits of object oriented programming is reuse of code and one of the ways this is achieved is through the…
- Introduction to Java File Input and Output — A File object represents a file name, not a file. The named file may or may not exist, and creating the object creates nothing…
- Introduction to JSON — XML (eXtensible Markup Language) is a text-based format for encoding structured, hierarchical data using custom tags that…
- Introduction to JSON: A Simpler Data Format — JSON uses two main structures: objects (key-value pairs in curly braces) and arrays (ordered lists in square brackets).
- Introduction to Keras — Tensors provide the data representations used by neural networks, from 0D scalars through higher-dimensional forms.
- Introduction to Keras and Workstation Setup — Keras connects Python programming with convenient deep-learning model definition and training.
- Introduction to Large Language Models and the Book — This section introduces a plan for building an LLM from scratch, presented on page 23 of the book.
- Introduction to Lists and Indexing — Lists solve real-world data problems beyond simple numeric storage, including text processing, format parsing, and data analysis.
- Introduction to Loops — Sequential execution performs statements one after another in the order they appear in the script.
- Introduction to Machine Learning Theory — The material establishes the topic and introductory purpose, but not the technical content.
- Introduction to Many-to-Many Relationships — SQL does not support arrays as a native data type, making array-based many-to-many workarounds impossible.
- Introduction to Modern User Interfaces — A command-line interface is defined by typed commands and typed computer responses.
- Introduction to Mouse Events — A GUI program has no main() routine that runs step by step from beginning to end. It must respond to events that happen at…
- Introduction to n-Step TD Methods — The full return is the complete discounted reward sequence through episode termination.
- Introduction to Neural Networks — Layers provide the component structure of deep learning models.
- Introduction to Nonuniform Learnability — Nonuniform learnability makes sample-size requirements flexible across competing hypotheses.
- Introduction to Object Serialization — ObjectOutputStream is optimized to avoid writing the same object more than once; on a second encounter it writes only a…
- Introduction to Object-Oriented Programming — Procedure-oriented programming organizes code around reusable functions; object-oriented programming organizes code around…
- Introduction to Objects and Classes — A zone is a self-contained unit combining code (methods) and data (attributes) with well-defined interactions with other zones…
- Introduction to OpenStreetMap and Geographic Coordinates — A geospatial application pipeline connects input data, a geocoding API, a database, and a visualization layer.
- Introduction to PAC Learning — PAC learnability is a definition involving a hypothesis class H, a function m_H, and a learning algorithm.
- Introduction to PageRank: Measuring Page Importance — spider.py systematically crawls web pages and stores them in a local database, recording both page content and the links between…
- Introduction to Problem Solving — We have seen how to create our own Python programs/scripts and the various stages involved in writing such programs. You may…
- Introduction to Programming Languages — Programming is a creative partnership where humans provide ideas, creativity, and judgment while computers provide speed…
- Introduction to Python Objects — Strings are Python objects that bundle both data (the characters) and methods (built-in functions) into a single entity.
- Introduction to PyTorch — Many scientific computing libraries do not immediately support the newest version of Python, so the latest release is not always…
- Introduction to Rademacher Complexity — Rademacher complexity properties provide simpler ways to derive bounds for transformed function or vector sets.
- Introduction to Relational Databases — The three primary data structures in a relational database are tables, rows, and columns.
- Introduction to Sequences — A string is a sequence of characters . Strings are basically just a bunch of words.
- Introduction to Sockets and Network Connections — HTTP is a standardized, text-based protocol that defines how web clients and servers communicate using a simple request-response…
- Introduction to SQL — CRUD is an acronym representing the four fundamental database operations: Create, Read, Update, and Delete.
- Introduction to SQL Queries — A database is a persistent, disk-based file that stores data as key-value pairs, unlike a dictionary which lives in RAM and…
- Introduction to SQLite — spider.py is the script used to crawl websites and record links.
- Introduction to SQLite and Database Files — The Database Browser for SQLite is a visual tool that reads SQLite database files and displays their contents in a user-friendly…
- Introduction to Swing Borders — BorderFactory.createEmptyBorder(top, left, bottom, right) creates an empty border that reserves space around the edges of a…
- Introduction to Swing Text Components — A JEditorPane displays a page when a program calls setPage with a URL, and that call can throw an exception that the program…
- Introduction to Switch Statements — A switch statement tests one expression and jumps to the case label that matches its value.
- Introduction to Tensors in PyTorch — PyTorch is organized into three broad components: a tensor library, an automatic differentiation engine, and a deep learning…
- Introduction to the AdamW Optimizer — Adaptive optimizers such as AdamW store additional parameters for each model weight, and that data is separate from the weights…
- Introduction to the Command Line Environment — The current directory, also called the working directory, is the folder whose files commands can reach by short name.
- Introduction to the Java Stream API — Filter and map are the two most basic intermediate operations in the Java Stream API, as described in the source.
- Introduction to the logging Module — What if you wanted to have some debugging messages or important messages to be stored somewhere so that you can check whether…
- Introduction to the Math Module — Python's trigonometric functions (sin, cos, tan) take arguments in radians, not degrees
- Introduction to the Random Module — Continuous distributions generate random values from an infinite range, unlike discrete selection which picks from a fixed set.
- Introduction to the Switch Statement — A switch statement can branch on a String value, letting the program react to a unit name typed by the user.
- Introduction to Threads — A GUI program is responsive when it responds to events very soon after they are generated.
- Introduction to urllib and HTTP Requests — BeautifulSoup transforms raw HTML strings into searchable tree-structured objects that mirror the document's logical hierarchy.
- Introduction to Web Scraping — HTTP responses follow a three-part structure: status line, headers, blank line, and body.
- Introduction to Word Embeddings — Embedding means converting data into a vector format, and it can be applied to video, audio, and text.
- Introduction to XML — json.loads() converts JSON strings directly into native Python lists and dictionaries, eliminating the need for additional…
- Introduction to XML Structure — ET.fromstring converts an XML string into a tree structure, transforming flat text into a navigable, queryable object.
- Introduction to XML Structure and Syntax — XML is a formal language with syntax rules that go far beyond simple text searching. Comments, CDATA sections, entity…
- Introduction to λ-return — Multiple n-step returns can be combined into one composite target.
- Iterables and Iteration — Tuple assignment unpacks multiple values from a tuple into separate variables in a single statement, with the number of…
- Iterating Over Arrays with Index Counters — A for-each loop is an alternative form of the for loop that makes it easier to visit every value in an array or collection.
- Iterating Over Dictionaries — Dictionaries are created empty using dict() or {} and store key-value pairs.
- Iterating Over Dictionaries: keys(), values(), and items() — The items() method converts a dictionary into a list of tuples, where each tuple contains one key-value pair.
- Iterating Over Dictionary Keys — The items() method returns a sequence of tuples, where each tuple contains one key-value pair from the dictionary.
- Iterating Over Dictionary Values — The items() method returns a sequence of tuples, where each tuple contains one key-value pair from the dictionary.
- Iterating Over Lists — append adds a single element to the end of a list, treating the argument as one indivisible object
- Iterating Over Lists and Other Sequences — Python's for loop is fundamentally different from C/C++ for loops: it is iterator-based rather than index-based, meaning Python…
- Iterating Over Parsed Data Structures — json.loads() returns native Python data structures (lists and dictionaries), not JSON text.
- Iterating Over Strings — Dictionaries outperform lists and variables for character counting because they only allocate space for characters that actually…
- Iterating Over Strings and Lists — A list of characters is fundamentally different from a string, even though both are sequences.
- Iterating Over Strings with for Loops — A for loop executes a block of code once for each element in a list, with the loop variable taking on each element's value in…
- Iterating Over Tuples and Dictionaries — Variable argument lists use * and ** syntax to bundle multiple arguments into a single parameter.
- Iterating Through Dictionaries with For Loops — Composite keys are tuples that combine multiple values into a single dictionary key, created using the syntax dictionary[value1…
- Iterating Through Dictionary Keys — A for loop over a dictionary iterates through keys; to filter by value, use the index operator to retrieve each value and test…
- Iterating Through File Content — A text file can be conceptualized as a sequence of lines, analogous to how a Python string is a sequence of characters.
- Iterating Through Lists — Lists are mutable: you can change their contents after creation by reassigning elements using bracket notation on the left side…
- Iterating Through Lists with for Loops — Index-based iteration combines range() and len() to generate indices, enabling you to read and modify list elements.
- Iterating Through Lists with Loops — We have also used the for..in loop to iterate through the items of the list. By now, you must have realised that a list is also…
- Iterating Through Multiple XML Nodes — findall() is a path-following function, not a global search function. It requires you to specify the exact hierarchy to your…
- Iterating Through Strings — Using a string's length as an index causes an IndexError because valid indices range from 0 to length - 1, not 0 to length.
- Iterating Through Strings with For Loops — Character counting uses a dictionary to store each unique character and its count.
- Iterating Through Strings with Loops — A string is a sequence of individual characters that can be accessed one at a time using the bracket operator.
- Iterator — A ListIterator moves in both directions and can add, set, and remove items, and it uses the same cursor model for all of them.
- Iterators and For-Each Loops — An iterator is an object that traverses a collection, and the same calling pattern works across different collection types.