{"id":18014862,"url":"https://github.com/zevv/mathpipe","last_synced_at":"2025-04-04T15:14:27.939Z","repository":{"id":150599136,"uuid":"310435867","full_name":"zevv/mathpipe","owner":"zevv","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-03T16:48:15.000Z","size":78,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T13:49:38.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-05T22:50:52.000Z","updated_at":"2022-11-11T09:28:03.000Z","dependencies_parsed_at":"2023-06-11T17:15:24.263Z","dependency_job_id":null,"html_url":"https://github.com/zevv/mathpipe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Fmathpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Fmathpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Fmathpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Fmathpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zevv","download_url":"https://codeload.github.com/zevv/mathpipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198466,"owners_count":20900081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T04:11:24.885Z","updated_at":"2025-04-04T15:14:27.917Z","avatar_url":"https://github.com/zevv.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nKind of like a spreadsheet for text pipes.\n\n## Usage\n\nMathpipe takes one or more expressions as command line arguments and reads data\nfrom standard input. The input can contain anything, and is scanned for\neverything resembling decimal or hexadecimal numbers. The numbers found in each\nlines are available as variables for the expressions through the variables `$1`\n.. `$9`.\n\nThe expressions can contain the usual arithmatic and binary operators and allow\ncalling of various built-in functions as described below.\n\nSome of these functions save state over lines, allowing things like\naveraging, integration, filtering, etc.\n\n## Examples\n\n- Multiply column #1 by a fixed number: `mp \"$1*8\"`\n- Create a running sum: `mp sum(%1)\"`\n- Low pass filter to smooth noisy data: `mp \"lowpass(%1)\"`\n- Basic arithmatic combining multiple columns: `mp \"$1 * ($2 + $3)\"`\n- Render a histogram of input data: `mp \"histogram($1)\"`\n\n## Function reference\n\n### Signal processing\n\n- `lowpass(val [,alpha [,Q]])`: Biquad lowpass filter. `alpha`: frequency `0..0.5`, `Q`: Q factor.\n- `int(val)`: Integrator / summation.\n- `diff(val)`: Differentiator\n\n### Statistics\n\n- `min(val)`: Running minimum\n- `max(val)`: Running maximum\n- `mean(val)`: Running mean / average\n- `median(val)`: Running median\n- `variance(val)`: Running variance\n- `stddev(val)`: Running sandard deviation\n\n### Bit arithmetic\n\nThe functions below all require the input data to be representable\nas integers.\n\n- `x \u003c\u003c y` / `x shl y`: Binary shift left\n- `x \u003e\u003e y` / `x shr y`: Binary shift right\n- `x and y` / `x \u0026 y`: Binary and\n- `x or y` / `x | y`: Binary or\n- `x xor y`: Binary xor\n\n### Generators\n\n- count([stepsize])\n- rand([min [, max]])\n- gauss([mu [, sigma]])\n\n### Utilities\n\n- `histogram(val)`: Render ASCII historgram of input data\n- `histogram(val, width)`: As above, but set width to `width` * stddev\n\n### Logarithms\n\n- `log(val, base)`\n- `log2(val)`\n- `log10(val)`\n- `ln(val)`\n- `exp(val)`\n\n### Rounding\n\n- `floor(val)`\n- `ceil(val)`\n- `round(val)`\n\n### Trigonomety\n\n- `cos(val)`\n- `sin(val)`\n- `tan(val)`\n- `atan(val)`\n- `hypot(val1, val2)`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Fmathpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzevv%2Fmathpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Fmathpipe/lists"}