semvec/pypi-packages huggingface dataset:
asar 0.1.2
Library for working with Electron's ASAR archive files
Keywords: asar

# asar

Library for working with [Electron's ASAR](https://github.com/electron/asar) archive files.

<a href="https://github.com/black-06/asar-py/actions/workflows/test.yml" > 
  <img src="https://github.com/black-06/asar-py/actions/workflows/test.yml/badge.svg"/> 
</a>
<a href="https://codecov.io/github/black-06/asar-py" > 
  <img src="https://codecov.io/github/black-06/asar-py/graph/badge.svg"/> 
</a>
<a href="https://pypi.org/project/asar" target="_blank">
  <img alt="PyPI - Version" src="https://img.shields.io/pypi/v/asar">
</a>
<a href="https://pypi.org/project/asar" target="_blank">
  <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/asar">
</a>

# Installation

```
pip install asar
```

# Usage

- [X] pack and extract asar.
  ```python
  from pathlib import Path
  from asar import create_archive, extract_archive
  
  create_archive(Path("src"), Path("app.asar"))
  extract_archive(Path("app.asar"), Path("dst"))
  ```
- [X] with unpack expression
  ```python
  create_archive(Path("src"), Path("app.asar"), unpack="*.exe")
  ```
  then we got:
  ```
  .
  ├── app.asar
  └── app.asar.unpacked
      └── f2.exe
  ```
- [X] list files of asar
  ```python
  from pathlib import Path
  from asar import AsarArchive
  
  with AsarArchive(Path("app.asar"), mode="r") as archive:
      print(archive.list())
  ```
  then we got:
  ```
  [Path('assets'), Path('assets/icon.png'), ...]
  ```
- [X] read one file from asar by random access
  ```python
  from pathlib import Path
  from asar import AsarArchive
  
  with AsarArchive(Path("app.asar"), mode="r") as archive:
      print(archive.read(Path("f1.txt"), follow_link=True))
  ```
  then we got:
  ```
  b'Hello, Asar'
  ```
- [X] create an asar from another asar, without extracting to filesystem.
  ```python
  import io 
  from pathlib import Path
  from asar import AsarArchive
  
  with AsarArchive(Path("app.asar"), mode="r") as reader, AsarArchive(Path("app.new.asar"), "w") as writer:
      writer.pack_other_asar(reader)
      writer.pack_file(path_in=Path("assets/added1.txt"), file_path=Path("added.txt"))
      writer.pack_stream(path_in=Path("assets/added2.txt"), file_reader=io.BytesIO(b"some text"))
  ```
  then we got app.new.asar, extract it:
  ```
  app_new_asar_extract
          ├── assets
          │     ├── added1.txt
          │     ├── added2.txt
          │     └── ... other files from app.asar 
          └── ... other files from app.asar
  ```
scSIGRN 0.0.7
GRN inference
Requires Python: >=3.7

# SIGRN
SIGRN: Inferring Gene Regulatory Network with Soft Introspective Variational Autoencoders
<p align="center">
     </a>
    <a href="https://pypi.org/project/scSIGRN/0.0.7/">
        <img alt="PyPI" src="https://img.shields.io/badge/scIGRN-0.0.7-blue" />
    </a>
    <a href="https://pypi.org/project/scSIGRN/0.0.7/">
        <img alt="PyPI - Python Version" src="https://img.shields.io/badge/python->V.3.8-red" />
    </a>
        <a href="https://pypi.org/project/scSIGRN/0.0.7/">
        <img alt="PyPI - Python Version" src="https://img.shields.io/badge/tutorial-package-green" />
    </a>
    
</p>

# Architecture

![SIGRN](https://github.com/lryup/SIGRN/blob/main/images/SIGRN_arc.png?raw=true)

# Dependencies
- python =3.8
- torch==2.1.0
- scanpy==1.9.1
- other detailed installation packages can be found in requirements.txt
- CUDA toolkit 11.0 or later.

# Installation

```
pip install scSIGRN==0.0.7
```

# Data Preparation
In our study, we trained our model using data from [BEENLINE](https://bcb.cs.tufts.edu/DAZZLE/BEELINE.zip).
You can download the datasets from the provided link. 

# Example tutorial

We provide an example tutorial.
Check out the [this tutorial](https://github.com/lryup/SIGRN/blob/main/Tutorial_package.ipynb) for a quick overview  of how to use SIGRN for your research!

# Usage

SIGRN accepts input data in CSV, TSV format, or H5AD format as provided by Scanpy (genes in rows and cells in columns for TSV and CSV). The output of the  GRN inference task includes an adjacency matrix and various evaluation metrics, such as AUC, EPR, and AUPRR.

# Baseline methods
- Beeline https://github.com/Murali-group/Beeline/tree/master
- DeepSEM https://github.com/HantaoShu/DeepSEM
- GRN-VAE/DAZZLE https://github.com/TuftsBCB/dazzle/tree/main

# References

- Thanks to the following authors for their papers and codes.

  [1] Pratapa, A., Jalihal, A.P., Law, J.N., Bharadwaj, A., Murali, T.: Benchmarking algorithms for gene regulatory network inference from single-cell transcriptomic data. Nature methods 17(2), 147–154 (2020)

  [2] Shu, H., Zhou, J., Lian, Q., Li, H., Zhao, D., Zeng, J., Ma, J.: Modeling gene regulatory networks using neural network architectures. Nature Computational Science 1(7), 491–501 (2021)

  [3] Zhu, H., Slonim, D.: Grn-vae: A simplified and stabilized sem model for gene regulatory network inference. bioRxiv pp. 2023–01 (2023)
pylicenser 0.0.14
代码混淆
Requires Python: <4,>=3.6
Keywords: encrypt, pylicenser

# Pylicenser
提供了2种加密的方式：
1. 基于[sourcedefender](https://pypi.org/project/sourcedefender/)的原理自己加以实现的，更好的兼容了目录级别的代码加密。
2. 使用Cython进行代码封装，也支持了目录级别的文件加密。  

此外，Pylicenser还支持运行时的过期校验——即设置ttl，服务启动后，Pylicenser会在其运行过程中时检测失效时间。

## 安装

```shell script
pip install pylicenser
```

## 1. 使用encrypt方式加密
```text
usage: pylicenser encrypt [-h] [--ttl TTL] [--dist DIST] str [str ...]

positional arguments:
  str          待加密的文件或文件夹

optional arguments:
  -h, --help   帮助信息
  --ttl TTL    有效日期，默认：0，单位：seconds。示例： 1s、2d、3m、4h (default: 0)
  --dist DIST  输出目录，默认当前dist目录 (default: ./dist)
  --verbose   是否打印日志 (default: False)
```

### 运行加密代码
该种方式支持使用pylicenser run运行加密脚本，但是不支持原生的```python -m script```，如需使用该种方式请采用撰写脚本引用的方式进行。

#### pylicenser run
```text
usage: pylicenser run [-h] script ...

positional arguments:
  script      py脚本文件
  args        脚本需要的参数

optional arguments:
  -h, --help  帮助信息
  --verbose   是否打印日志 (default: False)
```

### 脚本加载引用加密后pye文件
```python
# 需要先引入，用于识别pye文件
import pylicenser
from package.module_file import func # module_file为加密后的pye文件
if __name__ == '__main__':
    print(func(1, 4, 'x'))
```

##  2. 使用Cython方式加密
采用该方式需要预先安装Cython，安装方式如下：
```shell script
pip install Cython
```
使用方式如下：
```text
usage: pylicenser cython [--dist DIST] [-h] str [str ...]

positional arguments:
  str          待编译的代码文件或文件夹

optional arguments:
  --dist DIST  输出目录，默认当前dist目录 (default: ./dist)
  -h, --help   帮助信息
  --verbose   是否打印日志 (default: False)
```

**Cython加密后，不影响代码原有使用方式，即原来脚本怎么运行，加密后还是怎么运行。**  
**相较于第一种加密，Cython加密具有平台依赖性，即在darwin上加密的代码在win或者linux下不一定能运行。**
PatternPalette 0.2
A Python package for generating various patterns.
Requires Python: >=3.6

# PatternPalette

`PatternPalette` is a Python package for generating a variety of patterns, including star patterns, number patterns, grid patterns, and more. It provides an easy-to-use interface for creating these patterns, which can be useful for educational purposes, graphical representations, or just for fun.

## Installation

You can install `PatternPalette` from PyPI using pip:

```bash
pip install PatternPalette

## Features

- **Star Pattern**: Generates a symmetrical star pattern.
- **Number Pattern**: Prints incremental numbers in each row.
- **Grid Pattern**: Displays a grid with `+` and `-` characters.
- **Pyramid Pattern**: Creates a pyramid shape made of stars.
- **Inverted Pyramid Pattern**: Forms an inverted pyramid shape made of stars.
- **Diamond Pattern**: Displays a diamond shape made of stars.
- **Right-Angle Triangle Pattern**: Shows a right-angle triangle shape made of stars.
- **Hollow Square Pattern**: Produces a square shape with stars on the border and spaces inside.
- **Fibonacci Pattern**: Prints the first `n` Fibonacci numbers in a line.
- **Number Pyramid Pattern**: Creates a pyramid of numbers.
- **Hollow Diamond Pattern**: Displays a diamond shape made of stars with hollow space inside.


## Usage

# Generate various patterns
from pattern_palette import PatternPalette

# Generate various patterns
PatternPalette.star_pattern(5)
PatternPalette.number_pattern(5)
PatternPalette.grid_pattern(4, 5)
PatternPalette.pyramid_pattern(5)
PatternPalette.inverted_pyramid_pattern(5)
PatternPalette.diamond_pattern(5)
PatternPalette.right_angle_triangle_pattern(5)
PatternPalette.hollow_square_pattern(5)
PatternPalette.fibonacci_pattern(10)
PatternPalette.number_pyramid_pattern(5)
PatternPalette.hollow_diamond_pattern(5)



## Open Source Repository Link
https://github.com/AdityaSrivastavDS/PatternPalette
image-processing-package-pchinodev 0.0.1
A package for image processing
Requires Python: >=3.10

# image_processing

Description.
The package image_processing is used to:
    Processing:
        - Histogram matching
        - Structural similarity
        - Resize image
    Utils:
        - Read image
        - Save image
        - Plot image
        - Plot result
        - Plot histogram

## Installation

Use the package manager [pip](https://pip.pypa.io./en/stable/) to install package_name

````bash
pip install image_processing
```

## Author
Pierr Chino

## License
[MIT](https://choosealicense.com/license/mit/)
reprb 1.0.8
Represent bytes with printable characters
Requires Python: >=3

## reprb

Represent bytes with printable characters, similar to how python built-in functions repr() and eval() do.

## why

Bytes objects in Python 3 can already be read from and written to files (like load/dump), but you can't easily understand or edit them when you open a binary file directly in a text editor.

`reprb`'s goal is to dump bytes to printable bytes and load them back to the original bytes object quickly (at least faster than the built-in `repr()`), especially when you analysis/dump/load bytes contain both printable and unprintable characters(like http message), `reprb` make it more editable and understandable.

## how
### Install
#### from pip
``` bash
python3 -m pip install reprb
```

#### from source
```bash
git clone git@github.com:Testzero-wz/reprb.git

cd reprb && pip3 install .
```

### Usage

repr bytes object:

```python
>>> from reprb import reprb, evalb
>>> msg = "abc123\x00\x07\x11\x90\xff中文№".encode()
>>> repr_bytes = reprb(msg)
>>> repr_bytes
b'abc123\\0\\a\\x11\\xc2\\x90\\xc3\\xbf\\xe4\\xb8\\xad\\xe6\\x96\\x87\\xe2\\x84\\x96'
>>> eval_bytes = evalb(repr_bytes)
>>> eval_bytes == msg
True
```

dump/load bytes from/to file:

```python
from reprb import dump, load, load_iter

dump_bytes = b"abc123\x00\x07\x84\x96"
dump_file = "dump.txt"

# dump bytes to file, seperate by "\n" default
with open(dump_file, "wb") as f:

    # dump bytes object
    dump(dump_bytes, f)

    # dump all bytes object in list
    dump_bytes_list = [dump_bytes, dump_bytes, dump_bytes]
    dump(dump_bytes_list, f)

# load all bytes from file, seperate by "\n" default
load_bytes_from_path = load(dump_file)

# load all bytes from file handler
with open(dump_file, "rb") as f:
    load_bytes_from_file = load(f)

# load iter
load_bytes_from_iter = list(load_iter(dump_file))

assert (
    [dump_bytes] + dump_bytes_list
    == load_bytes_from_path
    == load_bytes_from_file
    == load_bytes_from_iter
)
```

If you want to store bytes with a more formatable structure like json:
``` python
from reprb import reprb, evalb

# you should decode reprb bytes since json.dump() only accept string object.
# btw, you can decode reprb(msg) bytes safely, because eprb(msg) bytes only contain ascii printable chars
stru = {
    "msg": reprb(http_msg).decode(),
    "extra_info": "whatever",
}

json.dump(stru)
```

## Benchmark

``` bash
$ python3 test.py
Test:
(6/6) Testcases passed. 
dump/load test passed.
Bench:
built-in repr: 1.2180822410s, 183074666.47 bytes/s
built-in eval: 4.8808067660s, 131310258.88 bytes/s
reprb/dumpb: 0.7567997570s, 294661828.23 bytes/s
evalb/loadb: 1.2524397970s, 491999696.49 bytes/s
```