semvec/pypi-packages huggingface dataset:
num-radix 1.0.2
Number radix/base encoding, decoding and formatting
Requires Python: >=3

# Number Radix

This is a Python script and library to encode, decode and format numbers
including fractions and exponential notation in radixes/bases other than
decimal, such as octal, dozenal/duodecimal, hexadecimal, base57 and base62. The
radix can also be determined by any number of digits specified: 0123456789ab...

## Requirements
* Python 3

## Installation
From the Python Package Index:
```
pip install num-radix
```

Or download and run:
```
python3 setup.py install
```

## Command-Line
Use the ```--help``` argument for help.
```
num-radix --help
```

By default, the script encodes and decodes in dozenal.

This outputs '6X,534;3000' encoded in dozenal.
```
num-radix --encode 142456.25 --format ',.4f'
```
The format string causes the output to have a scale of 4 and every 3 integer
digits to be separated by a comma.
The format is given in [Python format string syntax](https://docs.python.org/3/library/string.html#format-specification-mini-language).

Format with e-notation. This outputs '4;133X82e-0E'.
```
num-radix --encode 0.000000000005526745 --format '.6e'
```

Encode in hexadecimal.
```
num-radix --encode 142 --base hex
```

Decode back to a decimal from dozenal.
```
num-radix --decode '6X534;3'
```

The input and output can be piped. Each line of input is encoded
(or decoded) and output on a new line.
```
echo -e "142\n4353" | num-radix --encode - | cat
```

## Python
Import the library.
```
from num_radix import Radix
```

Create a radix.
```
dozenal = Radix.dozenal()
hexa = Radix.hex()
base20 = Radix("0123456789ABCDEFGHIJ", sep="|")
```

Encode with the radix object.
```
dozenal.encode(3546)
dozenal.encode(142456.25, "013.4f")
numbers = [142456.25, 34, 0.000345]
"These numbers {:013.4f}, {}, {:e} are in dozenal".format(*dozenal.wrap(numbers))
```

Encoding date & time.
```
from datetime import datetime
now = datetime.now()
dozenal_now = dozenal.wrap(now.timetuple()[:6])
"{}-{:02}-{:02} {:02}:{:02}:{:02}".format(*dozenal_now)
```

Decode with the radix object.
```
dozenal.decode("6X534;3")
```
There are more examples in the demo section at the end of the ```__init__.py``` file.
limittar 1.0.4
Limiting the size of tar archives
Requires Python: >=3.4

# LimitTar
This application/library is for limiting the size of a tar archive for spanning
data directly across multiple Blu-Ray/DVD discs, flash drives or as files on
online storage with file size limits. It tries to fit as many files as possible
into a tar archive without creating partial files. This means each tar archive
can be restored independently without joining.

This application was mainly developed to be used with
[aes-pipe](https://github.com/2sh/aes-pipe) for space efficient data
encryption using pipes to remove the need for temporarily storing the
potentially large archives and encrypted data.

## Requirements
* Python 3.4+

## Installation
From the Python Package Index:
```
pip install limittar
```

Or download and run:
```
python3 setup.py install
```

## Command-Line Usage
Use the ```-h``` argument for help:
```
limittar -h
```

### Spanning files in tar archives across multiple USB storage devices
```
find /path/photos/ -print0 > files

limittar -0 -i files -l remaining1 -s 16g > /dev/sdX
limittar -0 -i remaining1 -l remaining2 -s 20g > /dev/sdX
cat remaining2 | limittar -0 -l remaining3 -s 16g > /dev/sdX
...
```
aes-pipe 1.0.3
Encrypting piped data with AES
Requires Python: >=3.4

# AES Pipe
This application/library is for encrypting piped data and was mainly developed to be
used with [limittar](https://github.com/2sh/limittar) for space efficient
data encryption using pipes to remove the need for temporarily storing the
potentially large archives and encrypted data.

## Requirements
* Python 3.4+
* PyCrypto

## Installation
From the Python Package Index:
```
pip install aes-pipe
```

Or download and run:
```
python3 setup.py install
```

## Usage
Use the ```-h``` argument for help:
```
aes-pipe -h
```

### Encrypting data
If no key command is specified, the user is prompted for a passphrase.
```
cat something.tar | aes-pipe > encrypted_tar
```

### Encrypting files spanned across multiple Blu-Ray discs
```
find /path/photos/ -print0 > files

limittar -0 -i files -l remaining1 -s 25025314784 | aes-pipe | cdrskin -v driveropts=burnfree -tao dev=/dev/sr0 -
limittar -0 -i remaining1 -l remaining2 -s 25025314784 | aes-pipe | cdrskin -v driveropts=burnfree -tao dev=/dev/sr0 -
...
```
As the remaining file list is output before the encryption ends, multiple
discs can be written to at once.

*Note that aes-pipe.py prepends a 32 byte nonce to the encrypted output data in
this case which needs to be calculated into the size limit of the tar.*

### Decrypting files from discs
Using the Blu-Ray discs created in the example above, the following line can be
run for each disc.
```
cat /dev/sr0 | aes-pipe -d | tar -xf -
```
Files will be output with their original paths.

### Decrypt only specific files and directories
This is useful for recovering deleted items from a backup.
Until the items are found, this will need to be run on each storage area
across which the encrypted data was spanned.
```
cat /dev/sdX | aes-pipe -d | tar -C path/to/output/dir/ -xf - "path/of/dir in archive/" path/of/a_file.png
```

### Encryption with a GPG public key

#### Output encrypted key file
```
cat something.tar | aes-pipe -c "gpg --output encrypted_key.gpg --encrypt --recipient email@example.com" > encrypted_tar
```
This pipes the encryption key and nonce to the gpg application. This also means
that the nonce is not prepended to the encrypted output which means the output
data size is the same as the input data size.

#### Use encrypted key file
```
cat encrypted_tar | aes-pipe -d -c "gpg --decrypt encrypted_key.gpg" > something.tar
```