🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • function cross_index

    Efficiently indexes into a Cartesian product of iterables without materializing the full product, using a linear index to retrieve the corresponding tuple of values.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1934-1952

    cartesian-product indexing combinatorics memory-efficient itertools-alternative
  • function cartesian_product

    Computes the Cartesian product of multiple 1D arrays, returning expanded array views for each dimension with optional flattening and copying.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1921-1931

    cartesian-product numpy array-operations combinatorics grid-generation
  • class ndmapping_groupby

    A parameterized function class that performs groupby operations on NdMapping objects, automatically using pandas for improved performance when available, falling back to pure Python implementation otherwise.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1864-1918

    groupby data-processing ndmapping pandas multi-dimensional
  • function make_path_unique

    Generates a unique path tuple by appending Roman numerals to avoid conflicts with existing paths in a counts dictionary.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1843-1861

    path-generation uniqueness hierarchical-structure roman-numerals conflict-resolution
  • function get_path

    Extracts and sanitizes a hierarchical path from a Labelled object or a tuple containing an existing path and a Labelled object, returning a tuple of capitalized, sanitized path components.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1822-1840

    path-construction sanitization hierarchical-data labelled-objects string-processing
  • function capitalize

    Capitalizes the first letter of a string, leaving the rest of the string unchanged.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1812-1819

    string-manipulation text-processing capitalization formatting utility
  • function unpack_group

    Unpacks a pandas DataFrame group by iterating over rows and yielding tuples of keys and objects, with special handling for objects with 'kdims' attribute.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1802-1809

    pandas dataframe groupby iterator generator
  • function get_unique_keys

    Extracts unique key values from an ndmapping object for specified dimensions, returning an iterator of unique tuples.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1795-1799

    data-extraction multi-dimensional key-extraction deduplication iterator
  • function drop_streams

    Filters out dimensioned stream parameters from key dimensions (kdims) and their corresponding keys, returning cleaned dimensions and keys.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1783-1792

    data-filtering streams dimensions data-processing tuple-manipulation
  • function wrap_tuple_streams

    Fills in None values in a tuple with corresponding dimensioned stream values based on matching key dimension names.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1766-1780

    tuple-manipulation stream-processing data-substitution dimension-mapping holoviews
  • function unbound_dimensions

    Filters a list of dimensions (kdims) to return only those that have not been associated with any of the provided streams.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1757-1763

    streams dimensions filtering data-binding holoviews
  • function dimensionless_contents

    Filters stream parameters to return only those that are not associated with any of the provided key dimensions.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1748-1754

    streams parameters filtering dimensions data-processing
  • function stream_parameters

    Extracts and flattens parameter names from a list of stream objects, with optional duplicate detection and parameter exclusion.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1708-1745

    streams parameters introspection validation duplicate-detection
  • function rename_stream_kwargs

    Maps parameter names in a kwargs dictionary to their renamed equivalents for a given stream object, with optional reverse mapping from renamed back to original names.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1688-1705

    parameter-mapping dictionary-transformation stream-processing parameter-renaming bidirectional-mapping
  • function stream_name_mapping

    Creates a bidirectional mapping dictionary between stream parameter names and their renamed versions, with optional parameter exclusion and reverse mapping capability.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1663-1686

    parameter-mapping stream-processing name-translation parameter-renaming dictionary-mapping
  • function wrap_tuple

    A utility function that ensures the input is wrapped in a tuple, leaving existing tuples unchanged and wrapping non-tuple values in a single-element tuple.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1658-1660

    utility tuple type-conversion normalization wrapper
  • function get_ndmapping_label

    Retrieves the first non-auxiliary object's label attribute from an NdMapping data structure by iterating through its values.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1637-1655

    holoviews ndmapping label-extraction metadata data-structure
  • function disable_constant

    A context manager that temporarily disables the 'constant' attribute on all parameters of a Parameterized object, restoring their original constant states upon exit.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1621-1634

    context-manager parameterized param temporary-modification constant-parameters
  • function resolve_dependent_kwargs

    Resolves parameter dependencies in a dictionary by evaluating dependent parameter values, Parameterized instance methods, and parameterized functions.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1603-1617

    parameter-resolution dependency-resolution parameterized param dictionary-processing
  • function resolve_dependent_value

    Recursively resolves parameter dependencies in a value by evaluating parameterized methods, functions, and widgets, including those nested in collections (lists, tuples, dicts, slices).

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1550-1600

    parameter-resolution dependency-injection reactive-programming param panel