semvec/pypi-packages huggingface dataset:
checkmate-sample 0.1.1
A sample project with checkerboard functionality
Requires Python: >=3.9

# checkmate-sample

This Python module provides a function to generate a checkerboard pattern using NumPy. The function make_checkerboard creates a 2D NumPy array representing a checkerboard with customizable board size and square size. Can be used for geospatial ML problems to try and combat autocorrelation. 


## Parameters

board_size (tuple[int, int]): Size of the board in (rows, columns).

square_size (tuple[int, int]): Size of each square in (rows, columns).

validation (bool): If True, use a ternary (0, 1, 2) pattern; if False, use a binary (0, 1) pattern

xarray only:

dim_names (dict): Dictionary specifying the names of x and y dimensions
da (xr.DataArray): Input DataArray to apply the checkerboard pattern to

## Dependencies

numpy and xarray

## Useage

# Create a NumPy checkerboard
checkerboard = make_checkerboard((10, 10), (2, 2))

# Create an xarray DataArray
da = xr.DataArray(np.random.rand(100, 100), dims=['lat', 'lon'])

# Apply checkerboard pattern to DataArray
result = make_checkerboard_xr(da, (10, 10), keep_pattern=1)
pynance-tools 0.1.0
A Python library for financial calculations and formulas of TVM, and asset valuation.
Requires Python: >=3.6

# pynance

`pynance` is a Python library that provides a collection of financial formulas and calculations for quants, traders, analysts, and students. It offers functions for time value of money, bond pricing, stock valuation, option pricing, risk metrics, and more.

## Features

- **Time Value of Money (TVM) Functions**: Present Value, Future Value, Net Present Value (NPV), Internal Rate of Return (IRR).
- **Bond Pricing and Yield Calculations**: Bond Price, Yield to Maturity (YTM).
- **Stock Valuation**: Dividend Discount Model (DDM).
- **Option Pricing**: Black-Scholes Model for option pricing.
- **Risk and Performance Metrics**: Sharpe Ratio, Value at Risk (VaR).

## Installation

You can install `pynance` via pip:

```bash
pip install pynance
```


## Functions Available

- #### Time Value of Money:
  ```python
  present_value(future_value, rate, periods)
  ```
  ```python
  future_value(present_value, rate, periods)
  ```
  ```python
  npv(rate, cash_flows)
  ```
  ```python
  internal_rate_of_return(cash_flows)
  ```

- #### Bond Pricing and Yield Calculations:
  ```python
  bond_price(face_value, coupon_rate, periods, discount_rate)
  ```
  ```python
  yield_to_maturity(face_value, coupon_rate, periods, price)
  ```

- #### Stock Valuation:
  ```python
  dividend_discount_model(dividend, growth_rate, discount_rate)
  ```

- #### Option Pricing:
  ```python
  black_scholes_call(S, K, T, r, sigma)
  ```

- #### Risk and Performance Metrics:
  ```python
  sharpe_ratio(returns, risk_free_rate)
  ```
  ```python
  value_at_risk(returns, confidence_level)
  ```

## Contributing
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

## Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch). 
- Create a new Pull Request.
## License
This project is licensed under the MIT License - see the LICENSE file for details.

## Contact
For any questions or issues, please contact reddygari.rithvik@gmail.com

## Acknowledgments
This library was inspired by my interest in finance and my coursework! Thanks to all who help in maintaining and adding new features!
schema-compare-postgres 0.0.1
Este pacote Python permite comparar estruturas de bancos de dados PostgresSQL, identificando diferenças entre tabelas, views, procedures e funções. Ideal para auditorias e sincronizações entre ambientes de banco de dados.
Requires Python: >=3.8


# Comparador de Estruturas de Bancos de Dados PostgreSQL

Este pacote Python fornece funcionalidades para comparar as estruturas de dois bancos de dados PostgreSQL, incluindo tabelas, views, procedures e funÃ§Ãµes. O resultado da comparaÃ§Ã£o Ã© registrado em um arquivo de log para anÃ¡lise.

## Funcionalidades

- **ComparaÃ§Ã£o de Tabelas**: Identifica diferenÃ§as entre as tabelas dos bancos de origem e destino, listando tabelas Ãºnicas em cada banco e diferenÃ§as nas colunas das tabelas comuns.
- **ComparaÃ§Ã£o de Procedures e Functions**: Compara o cÃ³digo de procedures e functions entre os bancos, identificando diferenÃ§as ou elementos exclusivos de cada banco.

## InstalaÃ§Ã£o

Para instalar o pacote, utilize:

```bash
pip install schema_compare_postgres
```

## Uso

### Conectando ao Banco de Dados

Para utilizar o pacote, primeiro, vocÃª deve se conectar aos bancos de dados de origem e destino:

```python
from schema_compare_postgres import conectar

conn_origem = conectar(banco="nome_banco_origem", user="usuario", password="senha", host="localhost")
conn_destino = conectar(banco="nome_banco_destino", user="usuario", password="senha", host="localhost")
```

### Comparando Estruturas

Depois de estabelecer a conexÃ£o, vocÃª pode realizar a comparaÃ§Ã£o entre as estruturas dos dois bancos:

```python
from schema_compare_postgres import comparar

comparar(conn_origem, conn_destino)
```

Os resultados da comparaÃ§Ã£o serÃ£o armazenados em um arquivo `compare.txt`, gerado na raiz do seu projeto.

### FunÃ§Ãµes DisponÃ­veis

- `conectar(banco, user, password, host, port=5432)`: Estabelece uma conexÃ£o com um banco de dados PostgreSQL.
- `comparar(conexao_banco_origem, conexao_banco_destino)`: Compara tabelas, views, procedures e functions entre dois bancos de dados.

## ContribuiÃ§Ã£o

ContribuiÃ§Ãµes sÃ£o bem-vindas! Sinta-se Ã  vontade para enviar pull requests ou abrir issues no repositÃ³rio.

## LicenÃ§a

Este projeto estÃ¡ licenciado sob a licenÃ§a MIT.
hydrogr 1.2.1
Hydrogr is a Python package that implement GR hydrological models in Rust
Requires Python: >=3.7

[![PyPi version](https://img.shields.io/pypi/v/hydrogr.svg)](https://pypi.python.org/pypi/hydrogr/) 
[![](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SimonDelmas/hydrogr/build.yml)
![GitHub issues](https://img.shields.io/github/issues/SimonDelmas/hydrogr)
![GitHub License](https://img.shields.io/github/license/SimonDelmas/hydrogr)

# HydroGR ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) ![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white)

Hydrogr is a python language software package for hydrological modelling, that implement several conceptual rainfall-runoff models (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A).
It is inspired from Irstea R language package: [airGR](https://cran.r-project.org/web/packages/airGR/index.html).

## Getting Started

### Installation

The package can be installed with pip :

```bash
python -m pip install hydrogr
```

Test the installation by importing the package in Python :

```python
import hydrogr
print(hydrogr.__version__)
```

### Examples

Examples based on the examples in the airGR package are available in the [example folder](https://github.com/SimonDelmas/hydrogr/tree/master/example) for the different models.

An example for calibrating models using [spotpy](https://github.com/thouska/spotpy) is also available.

![gr4h](https://github.com/SimonDelmas/hydrogr/assets/28869386/3c980461-42d7-4de9-bae7-6bb127c978f1)

## License

This project is licensed under the GLP-2.0 License - see the [LICENSE.md](LICENSE.md) file for details.
cico-tunnel 1.1.5
Expose your localhost to the web. Like a Ngrok
Requires Python: >=3.6

# Cico Tunnel

O **Cicotunnel** é uma ferramenta que utiliza SSH para expor portas locais para a internet de forma segura e fácil. Com o Cico Tunnel, você pode criar um túnel SSH para acessar seu servidor local a partir de qualquer lugar.

## Pré-requisitos

Antes de começar, certifique-se de que você possui:

1. **Acesso SSH**: Você precisa de um servidor SSH ao qual você tenha acesso e permissão para criar túneis. 
   * Você pode usar seu próprio servidor, mas precisará:
      - Criar um usuário SSH.
      - Permitir login sem senha.
      - Permitir o forwarding e o gateway.
   * Ou você pode usar o servidor fornecido pelo Cico Tunnel para um acesso rápido.
   
2. **Python**: Certifique-se de que o Python está instalado no seu sistema. Você pode baixar a versão mais recente do Python em [python.org](https://www.python.org/).

3. **Acesso à Internet**: É necessário para criar o túnel SSH e acessar o servidor.

## Instalação

1. **Instale via pip**:

   ```bash
   pip install cico-tunnel
   ```

## Uso

Para usar o Cico Tunnel, siga estas etapas:

1. **Execute o comando `cicotunnel`, passando a porta local que deseja expor**:

   ```bash
   cicotunnel 80
   ```

   Isso irá iniciar o Cico Tunnel e criar um túnel para a porta 80 do seu localhost. 
   Se você quiser usar um servidor SSH diferente do padrão, use a flag `-r` ou `--remote` seguido do endereço do seu servidor. Por exemplo:

   ```bash
   cicotunnel 80 -r usuario@meu.servidor.com
   ```

2. **Visualize a URL**:
   O Cico Tunnel exibirá a URL pública para o seu servidor local através do túnel SSH no terminal. Use essa URL para acessar seu servidor local de qualquer lugar na internet.

## Exemplos

* Expor a porta do MySQL do localhost no cicotunnel:

  ```bash
  cicotunnel 3306
  ```

* Expor a porta do MySQL do localhost utilizando um servidor SSH específico:

  ```bash
  cicotunnel 3306 -r usuario@meu.servidor.com
  ```


## Contribuindo

Sinta-se à vontade para contribuir com o projeto! Você pode fazer isso de várias maneiras:

- **Dar Estrelas**: Se você gostou do Cicotunnel e acha que ele é útil, considere dar uma estrela ⭐ no [repositório](https://github.com/hugosantoslisboa/cico-tunnel). Isso ajuda a apoiar o projeto e mostra que você aprecia o trabalho!

- **Relatar Problemas**: Se você encontrar algum problema ou bug, por favor, abra uma [issue](https://github.com/hugosantoslisboa/cico-tunnel/issues) no repositório.

- **Enviar Pull Requests**: Se você tem melhorias ou correções, envie um pull request para o repositório.

- **Feedback**: Qualquer feedback é bem-vindo para ajudar a melhorar o Cico Tunnel.
tjrcr 2.0.0
Library for validating parameters for comprehensive reservoir regulation.
Requires Python: <4.0,>=3.9

# tjrcr

`tjrcr` is a Python library designed for validating parameters for comprehensive reservoir regulation. This library
provides methods to ensure that the input data meets specific criteria required for effective reservoir management, such
as having a full 12 months of data for each year and a minimum of 10 years of data.

## Installation

To install the library, use pip:

```bash
pip install tjrcr
```

## Usage

### Basic Example

```python
import pandas as pd
from tjrcr import is_comprehensive_regulation
from tjwb import TJWBResult  # This is referenced from the tjwb library

# Prepare your data
df = pd.DataFrame({
    'datetime': pd.date_range(start='2010-01-01', periods=120, freq='M'),
    'inflow_speed': range(120),
    'outflow_speed': range(120, 240)
})

# This is just an example for the TJWBResult class, please refer to the tjwb library for more details
tjwb_result = TJWBResult(
    datetime=df['datetime'],
    inflow_speed=df['inflow_speed'],
    outflow_speed=df['outflow_speed'],
    components_outflow_speed={}
)

# Validate parameters
result = is_comprehensive_regulation(
    tjwb_result=tjwb_result,
    eps=1.0,
    P=80.0,
    V_c=1000.0,  # Dead water level
    forced_gt_10_year=False,  # Allows the function to proceed even if your dataset spans fewer than 10 years.
    forced_12_months_each_year=False
    # Allows the function to proceed even if any year in your dataset has fewer than 12 months of data.
)

print(f"Is comprehensive regulation valid? {result}")
```

### Functions

- **`is_comprehensive_regulation`**: Validates whether the input data is suitable for comprehensive reservoir regulation
  based on certain criteria like minimum years of data, full monthly data per year, and comparison against a threshold
  value.

## Error Handling

The `tjrcr` library includes validation steps that raise exceptions if the input data does not meet the required
criteria:

- **Insufficient Years of Data**:
    - If the dataset does not span at least 10 years, a `ValueError` is raised.

- **Incomplete Monthly Data**:
    - If any year in the dataset does not have data for all 12 months, a `ValueError` is raised.

## Reference to `tjwb`

The `tjrcr` library references the `TJWBResult` class from the `tjwb` library, which handles the conversion of reservoir
data into a format suitable for analysis. You can find more details on how to use `TJWBResult` and related calculations
in the [tjwb GitHub repository](https://github.com/duynguyen02/tjwb).

## License

This library is released under the MIT License.

## Contact

If you have any questions or issues, please open an issue on [GitHub](https://github.com/duynguyen02/tjrcr/issues) or
email us at [duynguyen02.dev@gmail.com](mailto:duynguyen02.dev@gmail.com).