semvec/pypi-packages huggingface dataset:
recent 0.1.3
log bash history to an sqlite database
License: MIT
Keywords: logging bash history database

======
recent
======

Recent is a more structured way to log your bash history.

The standard ~/.bash_history file is inadequate in many ways, its
worst fault is to by default log only 500 history entries, with no timestamp.
You can alter your bash HISTFILESIZE and HISTTIMEFORMAT variables but it
is still a unstructured format with limited querying ability.

Recent does the following:

1. Logs current localtime, command text, current pid, command return value,
   working directory to an sqlite database in ``~/.recent.db``.

2. Logs history immediately, rather than at the close of the session.

3. Provides a command called recent for searching logs.

installation instructions
-------------------------

You need will need sqlite installed.

Install the recent pip package:

``pip install recent``

Add the following to your .bashrc or .bash_profile:

``export PROMPT_COMMAND='log-recent -r $? -c "$(HISTTIMEFORMAT= history 1)" -p $$'``

And start a new shell.

usage
-----

Look at your current history using recent:

``recent``

Search for a pattern as follows:

``recent git``

For more information see the help:

``recent -h``

Not currently recent doesn't integrate with bash commands such as
Ctrl-R, but this is in the pipeline.

You can directly query your history using the following:

``sqlite3 ~/.recent.db "select * from commands limit 10"``

dev installation instructions
-----------------------------

``git clone https://github.com/trengrj/recent && cd recent``

``pip install -e .``

security
--------

Please note, recent does not take into account enforcing logging
for security purposes. For this functionality on linux, have a
look at auditd http://people.redhat.com/sgrubb/audit/.
pynewtonmath 1.0.1
Python 3 wrapper for the Newton math API
License: MIT
Keywords: newton API REST math maths restful

PyNewtonMath
============

Basics
------

PyNewtonMath is a Python 3.x API wrapper providing full support for the
`newton micro-service`_, which is `available on GitHub`_.

Newton does anything from numerical calculation to symbolic math
parsing.

Installation
------------

Using pip:

::

    pip install pynewtonmath

From GitHub:

::

    pip install git+https://github.com/benpryke/pynewtonmath

Usage
-----

.. code-block:: python

    import pynewtonmath as newton

    newton.derive('x^2') # -> '2 x'
    newton.cos('pi') # -> -1
    newton.zeroes('x^2+2x') # -> [-2, 0]

-  No instantiation required
-  Supports natural return types

The following methods take optional extra arguments for convenience. As
per the API, if these are not specified they must be included before a
horizontal bar ``'|'`` in the expression for newton.

.. code-block:: python

    newton.log('2|8') # -> 3
    newton.log(8, base=2) # -> 3

    newton.tangent('2|x^3') # -> '12 x + -16'
    newton.tangent('x^3', x=2) # -> '12 x + -16'

    newton.area('2:4|x^3') # -> 60
    newton.area('x^3', start=2, end=4) # -> 60

See `the newton API GitHub repo`_ for the full list of endpoints.

.. _newton micro-service: https://newton.now.sh
.. _available on GitHub: https://github.com/aunyks/newton-api
.. _the newton API GitHub repo: https://github.com/aunyks/newton-api