Setz
Setz is a command line utility used to run set operations on files using python syntax
Usage
setz “query” [a.txt b.txt ..]
Possible Queries
- Set Membership. Test if an element belongs to a set.
“‘test’ in a”
- Set Equality. Test if two sets contain the same elements.
“a == b”
- Set Cardinality. Return the number of elements in the set.
“len(a)”
- Subset Test. Test if a given set is a subset of another set.
“a < b”
- Set Union. Find union of two sets.
“a | b”
- Set Intersection. Find intersection of two sets.
“a & b”
- Set Complement. Given two sets A and B, find all elements in A that are not in B.
“a - b”
- Set Symmetric Difference. Find symmetric difference of two sets.
“a ^ b”
- Power Set. Generate all subsets of a set.
“power_set(a)”
- Set Cartesian Product. Find A x B.
“product(a, b, ..)”
- Disjoint Set Test. Test if two sets are disjoint.
“is_disjoint(a, b, ..)”
- Empty Set Test. Test if a given set is empty.
“is_empty(a)”
- Minimum. Find the smallest element of a set.
“max(a)”
- Maximum. Find the largest element of a set.
“min(a)”
Examples
> setz ‘“foo” in a’ <(echo foo) 1 > setz ‘len(a)’ <(echo for bar garply) 3 > setz ‘a < b’ <(echo foo bar baz) <(echo foo bar) 0 > setz ‘max(a)’ <(echo 9001 10) 9001 > setz ‘is_disjoint(a, b, c)’ <(echo foo) <(echo bar) <(echo baz garply) 1 > setz ‘a | b’ <(echo foo) <(echo baz garply) garply foo baz > setz ‘product(a, b)’ <(echo foo bar) <(echo baz garply) foo, garply foo, baz bar, garply bar, baz > setz ‘power_set(a)’ <(echo foo bar garply) garply foo garply, foo bar garply, bar foo, bar garply, foo, bar
Metadata
Release files for Setz 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Setz-0.0.1.tar.gz | 2.6 kB | Without provenance | Details for Setz-0.0.1.tar.gz |
Release files / Setz-0.0.1.tar.gz
| Download URL | Setz-0.0.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc5da42a8faad4141b2fb04887e023b5fa7cef01f4a6c23fd73d9f17fe3350eb
|
|
BLAKE2b-256 checksum How to use checksums |
8464772bd35eabe383eae2121de00b73829906fb774fcfda31f2a88ba1dcc767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Setz 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.