semvec/pypi-packages huggingface dataset:
shifrator 2.0.0
This is encoder for your text.
Requires Python: >=3.6
Keywords: files speedfiles

## What is this ? ##

Python library for text encryption.

```python
from shifrator.main import Shifrator 

sh = Shifrator()
print(sh.encrypt('Hello World!', 'test111'))
```

output: `WtР°Р°Рі РљРіС‘Р°s!`

```python
from shifrator.main import Shifrator 

sh = Shifrator()
print(sh.decrypt('Ifmmp Xpsme!', 'test111'))
```

output: `Hello World!`

## To encrypt files ##

in file text.txt:
`Hello World!`

```python
from shifrator.main import Shifrator

sh = Shifrator()
sh.shdocs(file='text.txt', op='shifr', key='test111')
```

after: 
`WtР°Р°Рі РљРіС‘Р°s` 

## Additionally ##

The encoder supports text encryption in both Russian and English.
used-addr-check 0.1.6
A tool to efficiently check if a Bitcoin Address has ever been used before
Requires Python: >=3.10

# used_addr_check (Python)
A tool to efficiently check if a Bitcoin Address has ever been used before

## Description

Based on [loyce.club's "all bitcoin addresses ever used" list](http://alladdresses.loyce.club/all_Bitcoin_addresses_ever_used_sorted.txt.gz), this library and CLI tool can search the list very, very fast and efficiently.

## Features

* Lookup either a single address, or a long list of potential addresses.
* CLI and library options
* Generates a binary search tree index from the text file, and then uses that to search for the address.

## Getting Started

This project depends on the large address list being downloaded and extracted.

```bash
# Download the zipped text file of used addresses, where each line is a used Bitcoin address.
wget http://alladdresses.loyce.club/all_Bitcoin_addresses_ever_used_sorted.txt.gz

# Extract the file
gunzip -d ./all_Bitcoin_addresses_ever_used_sorted.txt.gz --stdout | pv > all_Bitcoin_addresses_ever_used_sorted.txt
```

Optionally, if you intend to use the `scan_file` subcommand, install `ripgrep`
from optimal performance:

```bash
# first, install cargo/rust
# then, run:
cargo install ripgrep
```


## Usage - CLI

```bash
pip install used_addr_check

# download and extract the required file:
wget http://alladdresses.loyce.club/all_Bitcoin_addresses_ever_used_sorted.txt.gz
gunzip -d ./all_Bitcoin_addresses_ever_used_sorted.txt.gz --stdout | pv > addr_list.txt

# generate the index file (optional):
used_addr_check index -f ./addr_list.txt
# the index file is now at: ./addr_list.index.parquet

# search a couple of addresses:
used_addr_check search -f ./addr_list.txt -s moW9o415jNfgyuzytEMZD84Kovri5DJ64e -s mncqTEYTidNdbqGZnXTd1JFYRrruuh5StV

# search for a long list of addresses (extracted by regex):
used_addr_check scan_file -f ./addr_list.txt -n file_with_addresses_to_lookup.txt
```

## Usage - Library

This example will generate the index file, if required.

```python
from used_addr_check import search_multiple_in_file

needles = [
    'moW9o415jNfgyuzytEMZD84Kovri5DJ64e',
    'mncqTEYTidNdbqGZnXTd1JFYRrruuh5StV'
]
haystack_file_path = './addr_list.txt'

addresses_found_list: List[str] = search_multiple_in_file(
    haystack_file_path=haystack_file_path,
    needles=needled,
)
print(f"{addresses_found_list=}")
```

## Performance Notes

* With the default indexing size of one index entry per 1000 addresses in the "haystack" file, the index is a 140MB Parquet file.
* On a 2023 mid-range laptop with an SSD:
    * Indexing takes 4 minutes.
    * Addresses can be searched at 20 query addresses ("needles") per sec.

There are certainly opportunities for further improvement, but this performance is adequate.

## Contributing

Please Star this repo if it's helpful.

Please open GitHub Issues and Pull Requests with features/bugs/fixes.

## Future Features

* Optionally disable `loguru` logging in subfunctions
* Convert "found address" result to an iterator.
* Test cases.
matvec 0.1.7
Fast matrix transforms

![matvec](logo.png)

A domain-specific language for fast graph shift operations.
This implements mathematical fields on numbers,
n-dimensional column vectors, and n-by-n sparse matrices.

**License:** Apache Software License
<br>**Author:** Emmanouil (Manios) Krasanakis
<br>**Dependencies:** `numpy`

# :zap: Quickstart
Creating a 5-dimensional vector (can use `numpy` arrays 
as inputs interchangeably with lists everywhere):
```python
from matvec import Vector
x = Vector([1, 2, 3, 4, 5])
```

Creating a 5x5 sparse matrix `A` in coo-format 
with non-zero elements `A[1,2]=9` and `A[3,0]=21`
```python
from matvec import Matrix
A = Matrix([1, 2],
           [3, 0],
           [9, 21],
           5)
```

Print the outcome of matrix-vector multiplication:
```python
print(A*x)
```

Print the outcome of left-multiplying the transpose of x
with A:
```python
print(x*A)
```

# :fire: Features
:rocket: Parallelized matrix-vector multiplication.<br>
:chart_with_downwards_trend: Memory reuse optimization.<br>
:mag: numpy compatibility.<br>
:factory: Common arithmetic operations.<br>

# :volcano: Benchmark
Benchmarks tested on a machine with 2.6 GHz CPU base clock and
up to 4.4 GHz turbo boost, 12 logical
cores, and 16GB DDR3 RAM. They span vectors of 1.E4 to
1.E6 elements and matrices with up to 100x the number of
non-zeroes (that is, if the matrices represented graphs, 
node degrees would be up to 100).

**For a lot of non-zeroes paralellization may be worse than scipy.**


| Task                                     | numpy/scipy | matvec    |
|------------------------------------------|-------------|-----------|
| Create new vector or array               | 0.019 sec   | 0.019 sec |
| 1000 temp. additions of 1.E6 vectors     | 1.897 sec   | 1.321 sec |
| Create matrix                            | 0.505 sec   | 0.183 sec |
| Sparse matrix with vector multiplication | 0.269 sec   | 0.103 sec |

![benchmarks](benchmarks.png)


# :memo: List of Operations
* Full arithmetic operations `* + - / == < > <= >=` between
vectors and other vectors or scalars.
* Matrix-vector multiplication `*` (both left and right).
* Element access and assignment for vectors with `[]`.
* Masking, such as `y = x[x>0]`.
* `matvec.clear()` clears cache.