semvec/pypi-packages huggingface dataset:
twinlab-client 0.0.0
Client interface for twinLab
Requires Python: >=3.9,<3.10

# twinLab client

Headless interface to the `twinLab` library.

## Installation
```bash
poetry install
```

## Environment setup
```bash
cp .env.example .env
```
and fill in your group and user names.

## Commands

Local or cloud testing:
```python
poetry run python scripts/trigger.py local_or_cloud
```
where the `local_or_cloud` flag is either `local` or `cloud` and where `trigger.py` can be replaced with any of the scripts in the `script` directory.
You need to have a local server for the `twinlab-cloud` repository running for local testing.

## Notebooks

Check out the `notebooks` directory for some examples to get started!
apiflows 1.0.9
A yaml data-drive HTTP API testing tools.
Requires Python: >=3.5

### apiflows testing
- A yaml data-drive HTTP API testing tools.

### usage
```
pip3 install apiflows
python3 -m apiflows [-c config.py]  -t testcases/github.yaml
```

### configuration(config.py)
```
#!/bin/env python3

import uuid
import logging

# common headers
HEADERS = {
    'content-type': 'application/json',
    'x-token': '1234',
}

# common extracts
EXTRACTS = {
    'USERNAME':'allen'
}

def pre_testing():
    """
    pre testing
    """
    logging.debug("pre_testing()...")
    HEADERS['x-apiflows-id'] = str(uuid.uuid4())

def pre_request(apicase):
    """
    pre request
    """
    # TODO here
    logging.debug("pre_request()...")
    apicase.set_header("mycookie", "PHPSESSIONID=apiflows")
    return apicase

def do_request(apicase):
    logging.debug("do_request()...")
    apicase.do_request()
    return apicase

def parse_response(apicase):
    """
    parse HTTP response
    """
    logging.debug("parse_response()...")
    code = apicase.parse_status_code()
    headers = apicase.parse_response_headers()
    body = apicase.parse_response_body()
    return {'code': code, 'headers': headers, 'body': body}

def post_request(apicase):
    """
    post request
    """
    # TODO
    logging.debug("post_request()...")
    response = apicase.get_response()
    if response is not None:
        logging.debug("    RESPONSE: " + response.text)
    
    return apicase

def post_testing():
    """
    post testing
    """
    # TODO
    logging.debug("post_testing()...")
```

### testcase example(github.yaml)
```
---
apicases:
- name: 获取GitHub API列表(Get Github API list)
  url: https://api.github.com
  method: GET
  headers:
    x-token: 5678
  data: '{"username":"apiflows"}'
  extracts:
    RATE_LIMIT_URL: $.rate_limit_url
    PUBLIC_GISTS_URL: $.public_gists_url
    ENCODING:
      in: headers
      exp: "$.Content-Encoding"
  assertions:
  - exp1: "$.hub_url"
    comparator: neq
    exp2: ""
  - exp1: "{{ENCODING}}"
    comparator: eq
    exp2: gzip
  - exp1: "{{RATE_LIMIT_URL}}"
    comparator: contains
    exp2: https
  - exp1: "{{PUBLIC_GISTS_URL}}"
    comparator: match
    exp2: (https:\/\/)
```

### comparators
- eq
- neq
- contains
- match

### test result
```
0:testcases/github.yaml
[获取GitHub API列表(Get Github API list)]: https://api.github.com/?username=allen
	EXTRACTOR:
		EXTRACT [RATE_LIMIT_URL]=https://api.github.com/rate_limit
		EXTRACT [PUBLIC_GISTS_URL]=https://api.github.com/gists/public
		EXTRACT [ENCODING]=gzip
	ASSERTIONS:
		$.hub_url = https://api.github.com/hub [neq] 
		{{ENCODING}} = gzip [eq] gzip
		{{RATE_LIMIT_URL}} = https://api.github.com/rate_limit [contains] https
		{{PUBLIC_GISTS_URL}} = https://api.github.com/gists/public [match] (https:\/\/)
```


### for development
```
python3 -m build
twine upload dist/* 
```
reservoirenggpy 1.3.8
A package for reservoir engineering calculations
Requires Python: >=3.7
Keywords: restoolbox,petroleum,reservoir

===================================
``reservoirpy``
===================================

-----------------------------
A collection of Reservoir Engineering Utilities
-----------------------------

This set of functions focuses on those that the author uses often while crafting programming solutions. 
These are the scripts that are often copy/pasted from previous work - sometimes slightly modified - resulting in a trail of slightly different versions over the years. Some attempt has been made here to make this implementation flexible enough such that it can be relied on as-is going forward.

Includes functions to perform simple calculations including;

- Inflow for oil and gas
- PVT Calculations for oil
- PVT calculation for gas
- Return critical parameters for typical components
- Creation of Black Oil Table information
- Creation of layered permeability distribution consistent with a Lorenze heterogeneity factor
- Extract problem cells information from Intesect (IX) print files
- Generation of AQUTAB include file influence functions for use in ECLIPSE
- Creation of Corey and LET relative permeability tables in Eclipse format

Changelist in 1.3.8:

- Fix bug in Hall & Yarborough Z-Factor algorithm

Changelist in 1.3.5:

- Fix bug in ECL deck zip/check recursion


Changelist in 1.3.4:

- Extend ECL deck zip/check function to handle IX formatted decks, and support zipping multiple decks at once.


Changelist in 1.3.2:

- Added robust Rachford Rice solver in Simulation Helpers
- Moved relative permeability functions and simulation helpers to seperate .simtools module


Changelist in v1.2.0:

- Added Component Critical Property Library


Changelist in v1.1.4:

- Attempting to fix reported issue with required dependencies not installing correctly


Changelist in v1.1:

- Fix API to SG calculation (141.4 vs 141.5)
- Added lower limit to first rho_po estimate for Oil Density with McCain method to avoid negative values with high Rs
- Added oil_sg and oil_api functions
- Modified HY Z-Factor solve algorithm to improve robustness
- Modified DAK Z-Factor solve algorithm to improve robustness
- Added Gas Z-Factor correlation from Wang, Ye & Wu (2021)
- Removed 'LIN' Z-Factor method due to significant errors above 12,000 psi. Use WYW method instead if speed needed.
rootdescent 0.1.0
A package for approximating roots using various methods.
Requires Python: >=3.6

# RootDescent

rootdescent is a Python package for numerical analysis, offering tools for approximating roots and performing numerical integration.

## Features

rootdescent currently includes the following classes and methods:

### RootApproximator

This class provides methods for finding the roots of functions using various numerical approximation techniques. The available methods are:

- Bisection method (`bisection`)
- Fixed-point iteration (`fixed_point_iteration`)
- Regula Falsi method (`regula_falsi`)
- Newton-Raphson method (`newton_raphson`)
- Secant method (`secant`)

### Integration

This class provides methods for approximating definite integrals of functions using various numerical integration techniques. The available methods are:

- Trapezoidal rule (`trapezoidal_rule`)
- Simpson's 1/3 rule (`simpsons_13_rule`)
- Simpson's 3/8 rule (`simpsons_38_rule`)

## Usage

Here's an example of how to use rootdescent to approximate the root of a function and the integral of another function:

```python
from rootdescent import RootApproximator, Integration

# Define the functions for root approximation and integration
def f(x):
    return x**2 - 4

def g(x):
    return x**3 - 6 * x**2 + 4 * x + 12

# Initialize the RootApproximator and Integration classes
root_approx = RootApproximator()
integration = Integration()

# Approximate the root of f(x) using the bisection method
root = root_approx.bisection(f, 0, 4, error=1e-6, display_iterations=False)
print(f"Root: {root}")

# Approximate the integral of g(x) using the trapezoidal rule
integral = integration.trapezoidal_rule(g, 1, 4, n=100)
print(f"Integral: {integral}")

## Installation

To install RootDescent, download the package and run the following command in your terminal or command prompt:





Replace my_function with your desired function and adjust the initial guesses and error according to your needs.

Contributing
Contributions are welcome! Please submit pull requests with bug fixes or new features.

License
This project is released under the MIT License.
proxy-decorator 0.1.2
A simple proxy decorator for Python functions
Requires Python: >=3.7

# proxy decorator

## usage

1. create a `ini` file or add to exist `ini` file

2. put this in your `ini` file

   ```ini
   [http]
   http = http://your_proxy_server:your_proxy_port
   https = https://your_proxy_server:your_proxy_port
   username = your_username
   password = your_password
   ```

3. use it in your program

   ```python
   from proxy_decorator.proxy_decorator import proxy_http
   
   config_file = "path/to/proxy_config.ini"
   
   @proxy_http(config_file)
   def your_function():
       # 您的函数实现
       pass