Results for “Record”
Small, practical examples. Search by task or narrow things down below.
Read one JSON document per line
Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.
Python✓ Tested
Remove duplicate values with a Set
Keep the first occurrence order while deduplicating.
Set✓ Tested
Remove duplicates from a list
Remove repeated hashable values while preserving the order in which they first appeared.
list✓ Tested
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Represent removed and inserted text
HTML: Del and ins record a textual change while retaining both versions in the document.
HTML✓ Tested
Set and inspect a fractional CPU limit
Docker / Compose: The cpus option records a limit in units of one billion NanoCPUs.
Docker / Compose✓ Tested
Set and inspect a memory limit
Apply a per-container limit when creating a container.
memory✓ Tested
Sort dictionaries by a value
Sort a list of dictionaries by a numeric field, leaving the original list unchanged.
sort✓ Tested
Split a line into named fields
Read a simple delimiter-separated line into variables.
read✓ Tested
Split a string into words
Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.
string✓ Tested
Start an existing container and attach to its output
Docker / Compose: create records the command; start with attach runs that existing container.
Docker / Compose✓ Tested
Sum typed values with reduce
Accumulate numeric array elements.
reduce✓ Tested