semvec/pypi-packages huggingface dataset:
hypersphereapi 1.0.0
Use HyperSphere's Python API to rapidly secure your data in a quantum-immune fashion!
Requires Python: >=3.7

# HyperSphere's Python SDK

Visit
[HyperSphere's Homepage](https://hyperspheretech.com)
for more information about HyperSphere and 
[HyperSphere's Documentation](https://docs.hyperspheretech.com)
for documentation information!
twittier 0.1.0
A tool to parse twitter http requests.
Requires Python: >=3.6

# Twittier

一些推特的实用小工具，方便用于推特抽奖等。

包含 `status_dumper` 和 `lucky_draw` 两个工具。

- status_dumper

    - 用于导出推文的评论、喜欢、引用、转推和动态（包含所有的）。

- lucky_draw

    - 用于抽奖，可以从 `status_dumper` 产生的动态（包含所有的）中抽取指定数量的用户。

## 安装

```shell
pip install twittier
```

## 用法

- status_dumper

  - 使用浏览器（Chrome/Edge等）打开你的推文，按下 `F12` 打开开发者工具，切换到 `Network/网络` 选项卡后并刷新页面。
  - 将页面一直往下滚动，直到所有的回复都显示出来
  - 点开 `XXX则转推` 和 `XXX个喜欢` 和 `XXX引用`，在打开的页面一直往下滚动，直到所有显示出来。
  - 点击开发者工具的 `下箭头` 图表，将所有的请求导出为 `HAR` 文件
  - 使用命令行命令 `python -m twittier status_dumper <HAR文件路径>` 运行程序
  - 程序会在当前目录下生成 `comments.json`、`likes.json`、`quotes.json`、`retweets.json` 和 `dynamic.txt` 文件，分别对应评论、喜欢、引用、转推和动态（包含所有的）。

- lucky_draw
  - 使用命令行命令 `python -m twittier draw <动态文件路径> -p [抽取数量列表]` 运行程序
  - 程序将会输出抽取的用户列表以及抽到的用户名单。
  - 例如：`python -m twittier draw dynamic.txt -p 1 2 3`，将会从 `dynamic.txt` 中抽取 1 个、2 个和 3 个用户。
  - 也可以添加 `-r` 来限定抽取的范围。默认为 `评论+喜欢+转推`
  - 例如：`python -m twittier draw dynamic.txt -p 1 2 3 -r like`，将会从 `dynamic.txt` 中抽取 1 个、2 个和 3 个`喜欢了推文`的用户。
  - 例如：`python -m twittier draw dynamic.txt -p 1 2 3 -r like retweet`，将会从 `dynamic.txt` 中抽取 1 个、2 个和 3 个`喜欢了推文并且转推了推文`的用户。
compressbinarytable 0.2.0
Compression of binary table
Requires Python: >=3.8,<4.0

# CompressBinaryTable
 
## Basic Usage:

```console
cbt -i input_file -o output_file -c 
```

## Options:

```console
-i = input, required 
-o = output, required 
-c = compression 
-d = decompression 
-t = output type, either csv or tsv 
--override = to override output file if it exist 
```

## Available Python functions:

```
# Returns numpy array of file as uncompressed, useful for ML (same as load as pandas df, and to_numpy())
cbt_to_array(compressed_file)

# Returns numpy array of name of the mutations as uncompressed, useful for ML, (same as load pandas df and use df.colums)
cbt_columns(compressed_file)
```

## Required file example:

### CSV:

```
strain_name,mut1,mut2,mut3,mut4,outcome
strain1,0,1,1,1,1,1
strain2,0,0,1,1,1,0
strain3,0,1,0,1,1,0
strain4,1,1,1,1,1,1
```

### TSV:

```
strain_name mut1    mut2    mut3    mut4    outcome
strain1 0   1   1   1   1   1
strain2 0   0   1   1   1   0
strain3 0   1   0   1   1   0
strain4 1   1   1   1   1   1
```

### CBT:

```
1;mut1;mut2;mut3;mut4;outcome
strain1;6;43;87;102
strain2;16;43;87;102
strain3;6;53;78;112
strain4;61;413;824;942
```
pop-llm 0.0.7
A Python library for Prompt Oriented Programming with Large Language Models
Requires Python: >=3.7

# POP: Prompt Oriented Programming

## Setup

Install from PyPI:

```bash
pip install pop-llm
```

Make sure you have an OpenAI API key in your environment variable: `OPENAI_API_KEY`.

Saving the key to `openai_api_key.txt` is recommended if you are using Jupyter Notebook:

```bash
echo $OPENAI_API_KEY > openai_api_key.txt
```

## Usage

### Getting Started

You can define a "function" using natural language. Simply define a `PopFunction` with three required parameters:

```python
from pop_llm import PopFunction

# Specify the input and output parameters, and a description
add = PopFunction(["a", "b"], ["sum"], "Add the two numbers")
```

Then you can call the function using

```python
answer = add(1, 2)["sum"]
```

If you want to view the raw API response, you can use

```python
raw_answer = add(1, 2)["raw"]
```

Optionally, you can specify these parameters:

```python
add = PopFunction(
    input_keys=["a", "b"], # The names of the input parameters
    output_keys=["sum"], # The names of the output parameters
    description="Add two numbers.", # The description of the task
    name = "add", # A name for the function, default to "function"
    input_assert=lambda a, b: type(a) == int and type(b) == int, # A function to assert the input
    temperature=0 # Set to 0 for deterministic, 1 for the most randomness
)
```

### Allowing LLM to use external tools

You can provide a list of external tools. Simply define some well documented functions and pass them to `PopFunction`.

The LLM Agent will automatically use these tools to help it complete the task.

For example, you have a secret function:

```python
def secret_function(a: int, b: int) -> int:
    """
    A secret function
    Args:
        a: The first string
        b: The second string
    Returns:
        int: The result of the secret function
    """
    return a * 2 + b - 1

secret_function_runner = PopFunction(
    input_keys=["a", "b"],
    output_keys=["output"],
    description="Return the result of the secret function on input a and b.",
    name = "secret_function",
    input_assert=lambda a, b: type(a) == int and type(b) == int,
    temperature=0,
    tools=[secret_function]
)
```

Be creative when defining your tools. This can be a web API, a database call, reading a file, etc.

Note: Your function input should be able to be parsed from JSON. The output should be able to be converted to string without loosing information. (i.e. str(output) is not something like `<object at 0x7f9c2c0b4a90>`)

For more examples, please refer to the [Demo Notebook](./demo.ipynb)