semvec/pypi-packages huggingface dataset:
thttp 1.3.0
An incredibly lightweight wrapper around urllib
Requires Python: >=3.6

# thttp

`thttp` is a single file, lightweight, well-tested wrapper around `urllib` that's intended to be copied directly into your project.

It's features include:

- Making GET, POST, PATCH, PUT, HEAD and OPTIONS requests
- Sending query parameters with your request
- Encoding JSON payloads for POST, PATCH and PUT requests
- Encoding form-encoded payloads for POST, PATCH and PUT request
- Sending custom headers with any request
- Disabling SSL certificate verification for local testing / corporate proxies
- Following (or not following) redirects
- Sending through a CookieJar object that can be reused between requests
- Authenticating with HTTP basic auth
- Specifying a custom timeout for your request
- Decompressing gzipped content in the response
- Loading JSON from the response
- Returning error responses instead of throwing exceptions from `urllib`
- `pretty()` function for printing responses
- Ability to upload files using the `{"file": open("file.png", "rb")}` style

Future features:

- Better detection of JSON responses
- Improve handling of non-utf-8 requests
- Improve handling of non-utf-8 responses

_Note: this project is not intended to solve all use cases that can be achieved with urllib, requests, httpx, or other HTTP libraries. The intent is to provide a lightweight tool that simplifies some of the most common use cases for developers._


## Installation

copy `thttp.py` directly into your project:

```
curl https://raw.githubusercontent.com/sesh/thttp/main/thttp.py > thttp.py
```

Or, install with `pip`:

```
python3 -m pip install thttp
```


## Basic Usage

See the tests for examples of usage, but, effectively it's as simple as:

```python
from thttp import request

response = request("https://httpbingo.org/get", params={"data": "empty"})

response.json
# {'args': {'data': ['empty']}, 'headers': {'Accept-Encoding': ['identity'], 'Fly-Client-Ip': ['45.76.105.111'], 'Fly-Forwarded-Port': ['443'], 'Fly-Forwarded-Proto': ['https'], 'Fly-Forwarded-Ssl': ['on'], 'Fly-Region': ['hkg'], 'Fly-Request-Id': ['01F6P2WQAY1NGPRDCXV9H60XW5'], 'Host': ['httpbingo.org'], 'User-Agent': ['Python-urllib/3.8'], 'Via': ['1.1 fly.io'], 'X-Forwarded-For': ['45.76.105.111, 77.83.142.42'], 'X-Forwarded-Port': ['443'], 'X-Forwarded-Proto': ['https'], 'X-Forwarded-Ssl': ['on'], 'X-Request-Start': ['t=1622091390302198']}, 'origin': '45.76.105.111, 77.83.142.42', 'url': 'https://httpbingo.org/get?data=empty'}

response.status
# 200
```


## Running the tests

```sh
> python3 -m unittest thttp.py
```

And to check the coverage:

```sh
> coverage run -m unittest thttp.py
> coverage html && open htmlcov/index.html
```

Run `black` before committing any changes.

```sh
> black thttp.py
```


## Packaging for release

```
rm dist/*
python3 -m build
python3 -m twine upload dist/*
```


## License

This code is currently released under the [UNLICENSE](UNLICENSE.md) and considered public domain.
If more appropriate for your usage you may consider this project released under the [MIT License](LICENSE.md).
anitub-lib 0.1.1
Library that parses data from the site anitube.in.ua

# anitube-ua-lib

Python library for working with [AniTube](https://anitube.in.ua/) - anime resource 

## Installation

```bash
pip install anitube-lib
```

## Usage
```python
# Import the library:
from anitube-lib import AniTube

# Initialize:
anitube = AniTube()

# Search for anime:
results = anitube.search_anime("naruto", limit=10)

# Get anime details:
anime = results[0]
print(anime.name)
print(anime.description) 
print(anime.rating)

# Get anime screenshots:
screens = anime.get_big_screens() 
# or
screens = anime.get_small_screens()

# Get anime playlist:
playlist = anime.get_playlist()
print(playlist.json)

# Get anime list by filters:
anime_list = anitube.get_anime(
    cat=[6, 22],
    year=[2010, 2020], 
    sort='rating'
)
```

## Description
anitube-ua-lib is a Python library for convenient work with AniTube anime resource.

It allows you to:
- Search anime
- Get anime details like description, rating, categories, etc
- Get anime screenshots
- Get anime playlist (video links)
- Get anime list by filters: category, release year, rating, etc
anitube-lib 0.1
Library that parses data from the site anitube.in.ua

# anitube-ua-lib

Python library for working with [AniTube](https://anitube.in.ua/) - anime resource 

## Installation

```bash
pip install anitube-lib
```

## Usage
```python
# Import the library:
from anitube_ua_lib import AniTube

# Initialize:
anitube = AniTube()

# Search for anime:
results = anitube.search_anime("naruto", limit=10)

# Get anime details:
anime = results[0]
print(anime.name)
print(anime.description) 
print(anime.rating)

# Get anime screenshots:
screens = anime.get_big_screens() 
# or
screens = anime.get_small_screens()

# Get anime playlist:
playlist = anime.get_playlist()
print(playlist.json)

# Get anime list by filters:
anime_list = anitube.get_anime(
    cat=[6, 22],
    year=[2010, 2020], 
    sort='rating'
)
```

## Description
anitube-ua-lib is a Python library for convenient work with AniTube anime resource.

It allows you to:
- Search anime
- Get anime details like description, rating, categories, etc
- Get anime screenshots
- Get anime playlist (video links)
- Get anime list by filters: category, release year, rating, etc
hullermeier 0.1.2
Hullermeier index for fuzzy partitions
Requires Python: >=3.10,<4.0

# Hullermeier Index for fuzzy partitions

**Projeto desenvolvido como Trabalho de Conclusão do Curso de Anderson de Alencar Barros**

Este projeto é a implementação do índice de Hullermeier usando pontos flutuantes de precisão arbitrária, conhecido como bigfloats, sendo útil para projetos que requerem alta precisão onde um ponto de fluante de precisão dupla poder ocasionar erros de divisão por zero ou não ser preciso o suficiente. Como o índice varia entre 0 e 1, também pode ser convertidos para precisão dupla com o operador do Python.


Para explorar o projeto comece fazendo um clone do projeto,

```bash
git clone https://github.com/AndersonAlencarBarros/hullermeier
```

Os requisitos para executar esse projeto são,

- Poetry
- Python 3.10

Para instalar use o comando,

```bash
pip install hullermeier
```

## Exemplo

```python
from hullermeier import hullermeier
import numpy as np


U = np.array([[1.0, 0, 0], [0, 1.0, 1.0]])
V = np.array([[1.0, 1, 0], [0, 0, 1]])

indice_de_hullermeier = hullermeier(U, V)

print(indice_de_hullermeier)
```

## Referências


```bash
HULLERMEIER, E. et al. Comparing fuzzy partitions: A generalization of the rand index and
related measures. IEEE Transactions on Fuzzy Systems, IEEE, v. 20, n. 3, p. 546–556, 2011.
```
ddqla 0.1.25
A smart way to create a ddql agent
Requires Python: >=3.10

# BaseAgent Class
It is an abstract class that implements an agent for reinforcement learning. This class can be extended to create specific agents for different environments.

## Constructor
The constructor accepts the following parameters:

- **num_actions**: The number of possible actions that the agent can take.
- **environment**: The environment in which the agent operates, represented as a numpy array.
- **fit_each_n_steps**: The number of steps after which the agent trains its models.
- **exploration_rate**: The probability that the agent chooses a random action instead of the optimal action.
- **exploration_rate_decay**: The decay rate of the exploration rate.
- **gamma**: The discount factor used in the Q-value update equation.
- **cumulative_rewards_max_length**: The maximum length of the array that keeps track of cumulative rewards.
- **memory_max_length**: The maximum length of the agent's memory.
- **memory_batch_size**: The batch size used for training the models.
- **allow_episode_tracking**: A boolean flag indicating whether the agent should track episodes.

## Methods
The BaseAgent class implements the following methods:

- **start_episode**: Starts a new episode.
- **stop_episode**: Ends the current episode.
- **get_episodes**: Returns all recorded episodes.
- **reset_episodes**: Resets all recorded episodes.
- **is_memory_ready**: Checks whether the agent's memory is ready for training.
- **step**: Performs a step of the agent, choosing an action, receiving a reward, and updating the models.
- **get_last_cumulative_rewards**: Returns the sum of the last cumulative rewards.

In addition, the it takes the following functions to be implemented in subclasses:

- **reset_state**: Resets the agent's state at the start of a new episode.
- **_get_reward**: Calculates the reward received by the agent for undertaking an action in a given state.
- **_get_model**: Returns the model used by the agent to learn the Q-value function.

## Usage Example
To use the class, you need to extend it and implement the abstract methods. Here's an example of how this might be done:

    class MyAgent(Agent):
        def reset_state(self):
            # Implementation of state reset
    
        def _get_reward(self, action, environment):
            # Implementation of reward calculation
    
        def _get_model(self, state_features):
            # Implementation of the model

Once the subclass is defined, you can create an instance of the agent and use it as follows:

    agent = MyAgent(num_actions=4, environment=np.array([0, 0, 0, 0]))
    agent.start_episode()
    for _ in range(100):
        agent.step()
    agent.stop_episode()

## Notes
BaseAgent is designed to be used with discrete environments and deep learning models. If you wish to use a continuous environment or a different learning model, you may need to make some modifications to the class.
WormholeSort 1.0.1
An alternative sorting method that sorts the indices rather than list elements.
Requires Python: >=3.7

# Wormhole Sort
"Wormhole Sort" implements a way to sort your lists by sorting the indexes rather than the list elements. This way, the order of the elements is not modified, but the way you access the elements is.

## What It Does & How to Use
Imagine you have the following list:
```python
sample_list = [5, 3, -2, 12, 6, 120, 5]
```
You would like to sort this list, but you want the list data to remain the same. Instead of moving the elements, you just warp the topology of the spacetime manifold that exists in between the elements, reconnecting it in an ordered manner.
```python
sorted_list = WormholeList(sample_list)
```
The result can be checked like so:
```python
print("List data:", sorted_list)

print("List elements accessed in order:")
for i in range(len(sorted_list)):
    print("Index", i, "=", sorted_list[i])
```

Which gives the following result as the output:
```
List data: [5, 3, -2, 12, 6, 120, 5]
List elements accessed in order:
Index 0 = -2
Index 1 = 3
Index 2 = 5
Index 3 = 5
Index 4 = 6
Index 5 = 12
Index 6 = 120
```
phonon-gas-model 1.0.0a0
Free energy calculation using phonon gas model

# <i>pgm</i>: A Python package for free energy calculations within the phonon gas model
Calculate thermodynamic properties of matter using phonon gas model(PGM)

[![GitHub Actions](https://github.com/MineralsCloud/pgm/actions/workflows/documentation.yml/badge.svg)](https://mineralscloud.github.io/pgm/index.html)
[![pypi](https://img.shields.io/pypi/v/phonon-gas-model.svg)](https://pypi.org/project/phonon-gas-model/)
[![pypi](https://img.shields.io/pypi/dm/phonon-gas-model.svg)](https://pypi.org/project/phonon-gas-model/)

## Contributors

This repository is authored and maintained by [Hongjin Wang][1] and [Jingyi Zhuang][2].

[1]: https://github.com/underhill1886

[2]: https://www.jappoker.com/

## How to cite

The associated paper is published [online here](https://authors.elsevier.com/c/1hQ5e_FEhOCgU).

Please cite this article as: 

Hongjin Wang, Jingyi Zhuang, Zhen Zhang, Qi Zhang, Renata M. Wentzcovitch, pgm: A Python package for free energy calculations within the phonon gas model, Computer Physics Communications (2023), Volume 291, 2023, 108845, [https://doi.org/10.1016/j.cpc.2023.108845](https://doi.org/10.1016/j.cpc.2023.108845).

If you are unable to access the full text of this article, please contact the authors.

## Installation
### Install from PyPI
You can install the package directly from PyPI:
```shell
$ pip install phonon-gas-model
```


### Manual install
To install the ``pgm`` package, first clone the code repository using ``git``:
```shell
$ git clone https://github.com/MineralsCloud/pgm.git
```

After cloning the code repository, change to the code directory using ``cd``:
``` shell
$ cd pgm
```

After changing to the code directory, install the required Python packages using ``pip``:
```shell
$ pip install -r requirements.txt
```

Finally, install the pgm package using ``pip``:
```shell
$ pip install .
```
See details in [Installation of pgm](https://mineralscloud.github.io/pgm/basics/installation.html).


## How to use
Here we provide two examples inside the example folder. One is CaSiO₃, and one is B8-FeO.

For the case of CaSiO₃, simply run the following commands from the root path of the package:

```shell
$ cd examples/casio3
```

```shell
$ pgm run casio3.yaml
```

and for another case, B8-FeO,

run the following commands from the root path of the package:

```shell
$ cd examples/feo
```

```shell
$ pgm run feo.yaml
```

See details [Command Line Tool of pgm](https://mineralscloud.github.io/pgm/basics/cli.html).

## Use your own example
First, you need to prepare a set of phonon calculations calculated at different temperatures.

Convert them as standard qha input files(for now use input converter in qha pkg), and put the input files like in the case of CaSiO₃ or B8-FeO

Compose your own `settings.yaml` file, enjoy.

Details will be provide shortly.

## Documentation

See [GitHub pages of pgm][3].

[3]: https://mineralscloud.github.io/pgm/