semvec/pypi-packages huggingface dataset:
alist-v3 0.1.1
Write for alist V3

# Alist-API-V3

根据[Alist API V3文档](https://alist.nn.ci/zh/guide/api/)，使用Python3实现的异步Alist V3 API SDK

! 注意: 本SDK未经严格测试，请勿轻易用于生产环境

## 安装

```bash
pip install alist_v3
```

## 使用

```python
import asyncio
from alist_v3 import AsyncClient


async def main():
    async with AsyncClient(usr='ur_user_name', pwd='ur_password', url="http://ur_url.com") as client:
        msg = await client.get_me()
        print(msg)
        print(await client.post_mkdir('/aliyun/test'))
        print(await client.post_list('/aliyun')) 

if __name__ == '__main__':
    asyncio.run(main())
```

## API

本SDK的Method与[Alist文档](https://alist.nn.ci/zh/guide/api/)中的API名称接近一致，可以参考文档使用

如有问题，可提issue
optigen 0.0.7
Genetic algorithms framework
Keywords: python,genetic,natural selection,algorithms,optimation

# Getting Started

OptiGen: A Python Genetic Algorithm Library

OptiGen is a Python library that simplifies the implementation of genetic algorithms for solving optimization problems. It provides a set of classes and functions to create, evolve, and evaluate populations of potential solutions.

## Installation
To use OptiGen, you can install it using pip:


`pip install optigen`

## Example Usage
Here's an example of how to use OptiGento evolve a population to match a predefined output pattern:

```
from OptiGen import next_generation, Phenotype

if __name__ == "__main__":

    training_data = Training_Data()

    phenotypes = []

    output = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    thresh_hold = 0.99
    population_size = 100
    mutation_rate = 0.001
    max_generations = 1000

    for __ in range(population_size):
        phenotype = Phenotype(len(output),[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
        for x in range(len(phenotype.result)):
            if phenotype.result[x] == output[x]:
                phenotype.fitness += 1 / len(output)
        phenotypes.append([phenotype.fitness, phenotype.result])
    phenotypes.sort(reverse=True)
    print(f"Generation 0: Best score: { phenotypes[0]}")
    training_data.original_data.append(phenotypes[0][0])

    for gen in range(max_generations):
        next_phenotypes = next_generation(phenotypes, mutation_rate).new_generation
        phenotypes = []
        for x in next_phenotypes:
            phenotype = Phenotype(len(output), x.result)
            for y in range(len(phenotype.result)):
                if phenotype.result[y] == output[y]:
                    phenotype.fitness += 1 / len(output)
            phenotypes.append([phenotype.fitness, phenotype.result])
        phenotypes.sort(reverse=True)

        print(f"Generation {gen + 1}: Best score: {phenotypes[0][0]} Result: {phenotypes[0][1]}")
        training_data.original_data.append(phenotypes[0][0])
        if phenotypes[0][0] >= thresh_hold:
            break
    training_data.show_graph()
```
Full Documentation: [GitHub](https://github.com/ShadowFlameFox/OptiGen/wiki/Documentation)