Unix管道的基本数学操作。

pcalc的Python项目详细描述


PCALC

Unix管道的基本数学操作。

https://travis-ci.org/geowurster/pcalc.svg?branch=masterhttps://coveralls.io/repos/geowurster/pcalc/badge.svg?branch=master
$ pcalc --help
Usage: pcalc [OPTIONS] COMMAND [ARGS]...

  Basic math operations for Unix pipes.

  When working with a negative positional argument: '$ pcalc mul -- -1'

  All commands read from 'stdin' and write to 'stdout'.  Most commands
  stream but a few (like median) hold all values in memory.  Empty or all
  whitespace lines are skipped.

  Some commands (typically prefixed with 'r') reduce all input values to a
  single value.  For instance, '$ pcalc add 3' adds 3 to all input values,
  but '$ pcalc radd' adds all the values together like:

      output = 0
      for v in values:
          output = output + v

  For the most part it doesn't matter, but this tool is implemented in
  Python with floating point division enabled when running in Python 2.

Options:
  --help  Show this message and exit.

Commands:
  abs     Compute absolute value.
  add     Add a constant to values.
  ceil    Ceiling values.
  div     Divide values by a constant.
  floor   Floor values.
  mean    Compute mean.
  median  Compute median.
  mod     Modulo values by a single divisor.
  mode    Compute mode.
  mul     Multiply values by a constant.
  pow     Exponentiation of values by a constant.
  radd    Reduce by addition.
  rdiv    Reduce by division.
  rmod    Reduce by modulo.
  rmul    Reduce by multiplication.
  round   Round values.
  rsub    Reduce by subtraction.
  sub     Subtract a constant from values.
  sum     Compute sum.

开发

$ git clone https://github.com/geowurster/pcalc.git
$cd tpcalc
$ pip install -e .\[dev\]$ py.test --cov pcalc --cov-report term-missing

许可证

LICENSE.txt

更改日志

CHANGES.md

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
具有作为接口的属性的java Hibernate实体类   在Java中检查int l,r的条件l+1<r的最快方法   java如何更新TornadFX ComboBox Kotlin   java Tomcat未调用控制器api   java在Android Studio中的alertdialog中打开新活动   xml VScode Java/Maven环境问题不同的计算机   java我需要修改循环中的一个文本字符串,这样程序就可以复制粘贴相同的字符串,但数字会增加   java如何从Twilio响应消息中获取内容   从Java5+diamond运算符开始初始化泛型集合的java方法   在java中循环,直到用户按下enter键   java如何找到组件属于哪个面板?   java我想计算一个代码需要的总迭代次数   <data 安卓:type=“*/*”/>不允许使用java字符串类型   解析我有一个带有开始日期和目标日期的字符串,我想在Java中获取日期并保存在变量中   在mongodb中使用ReflectionDBObject类插入java对象?