semvec/pypi-packages huggingface dataset:
batch-calculator 0.0.1
3Di batch calculations
License: MIT

batch-calculator
==========================================

Introduction
------------
This tool can be used for reeksberekeningen.

Installation
------------
The easiest way to install the tool is through cloning the repository.

For installation on the utr-con-task-01.nens.local use this (you need administrator rights for this!):

1. First copy this repository to your workdir on your local machine, so that you can access it on the linux-machine

2. Then copy the batch-calculator to the root directory of the linux-machine::

    $ sudo su
    $ rm -r /root/batch-calculator
    $ cp /mnt/workdir/A_vtVeld/batch-calculator /root/ -r

3. Then install or upgrade the batch-calculator through a local installation procedure::

    $ pip3 install -e /root/batch-calculator --upgrade

Usage
-----

To ensure the correct behaviour of this tool please go through the following steps:

#. Make sure your aggregation_settings table in the SQLite contains 3 entries for discharge: `cum`, `cum_negative`, and `cum_positive`. And all have `timestep` set to 3600.

#. Create a folder with all the rain files you want to use in your simulations. These rain files should be in 'min,mm'-format, where min is the timestep in minutes and mm is the amount of rain that falls during the timestep in millimeters. Each timestep is seperated by a newline like in the example below::

    0,5.0
    30,1.5
    60,0.0
#. Create an output folder in which the result files will be stored.
#. Find the "id" of your model in the Threedi Model List: https://api.3di.live/v3/threedimodels/
#. Open a command window and navigate to the batch-calculator folder.
#. Run ``$ run-rain-series-simulations --help`` to see which arguments you need to specify.
#. Run ``$ process-rain-series-results --help`` to see which arguments you need to specify.

Created Files and Directories
-----------------------------

- aggregation_netcdf, directory containing simulation aggregate result data
- simulations, directory containing simulation log data (use --debug option)
- threedi_urban_eia_nl_statistics.csv, batch calculation result
- crashed_simulations.json, IDs of crashed simulations (optional)
- created_simulations_<date>.json, information about created simulations, serves as input file for process-rain-series-results
- gridadmin.h5, necessary for calculation of batch statistics
- nan_rows.json, information about weirs that contain NaN data in their cumulative discharge (optional)

Example
------------

  $ run-rain-series-simulations <ThreediModel ID> <rain files dir> <results dir> -o <organisation (optional)> -h <host (optional)>

  $ process-rain-series-results <created simulations json file> -h <host (optional)> -d <sets debug flag to True> -s <skips downloading result files>

Example command::

  $ run-rain-series-simulations 12345 rain_files/ results/ daan.vaningen

  $ process-rain-series-results results/created_simulations.json daan.vaningen
hyperparameter-tuning 0.3.2
A minimal framework for running hyperparameter tuning
License: MIT
Requires Python: >=3.8
Keywords: ml, optimization, hyperparameter, tuning, fairness

# hpt

![Tests status](https://github.com/AndreFCruz/hpt/actions/workflows/python-package.yml/badge.svg)
![PyPI status](https://github.com/AndreFCruz/hpt/actions/workflows/python-publish.yml/badge.svg)
![Documentation status](https://github.com/AndreFCruz/hpt/actions/workflows/python-docs.yml/badge.svg)
![PyPI version](https://badgen.net/pypi/v/hyperparameter-tuning)
![OSI license](https://badgen.net/pypi/license/hyperparameter-tuning)
![Python compatibility](https://badgen.net/pypi/python/hyperparameter-tuning)

A minimal hyperparameter tuning framework to help you train hundreds of models.

It's essentially a set of helpful wrappers over optuna.

Consult the package documentation [here](https://andrefcruz.github.io/hpt/)!


## Install

Install package from [PyPI](https://pypi.org/project/hyperparameter-tuning/):


`
pip install hyperparameter-tuning
`

## Getting started

```py
from hpt.tuner import ObjectiveFunction, OptunaTuner

obj_func = ObjectiveFunction(
    X_train, y_train, X_test, y_test,
    hyperparameter_space=HYPERPARAM_SPACE_PATH,    # path to YAML file
    eval_metric="accuracy",
    s_train=s_train,
    s_val=s_test,
    threshold=0.50,
)

tuner = OptunaTuner(
    objective_function=obj_func,
    direction="maximize",    # NOTE: can pass other useful study kwargs here (e.g. storage)
)

# Then just run optimize as you would for an optuna.Study object
tuner.optimize(n_trials=20, n_jobs=4)

# Results are stored in tuner.results
tuner.results

# You can reconstruct the best predictor with:
clf = obj_func.reconstruct_model(obj_func.best_trial)
```

## Defining a hyperparameter space

The hyperparameter space is provided either path to a YAML file, or as a `dict` 
with the same structure.
Example hyperparameter spaces [here](examples/hyperparameter_spaces/).

The YAML file must follow this structure:
```yaml
# One or more top-level algorithms
DT:  
    # Full classpath of algorithm's constructor
    classpath: sklearn.tree.DecisionTreeClassifier
    
    # One or more key-word arguments to be passed to the constructor
    kwargs:
        
        # Kwargs may be sampled from a distribution
        max_depth:
            type: int           # either 'int' or 'float'
            range: [ 10, 100 ]  # minimum and maximum values
            log: True           # (optionally) whether to use logarithmic scale
        
        # Kwargs may be sampled from a fixed set of categories
        criterion:
            - 'gini'
            - 'entropy'
        
        # Kwargs may be a pre-defined value
        min_samples_split: 4


# You may explore multiple algorithms at once
LR:
    classpath: sklearn.linear_model.LogisticRegression
    kwargs:
        # An example of a float hyperparameter
        C:
            type: float
            range: [ 0.01, 1.0 ]
            log: True

```
fessql 1.1.0
同步异步SQL基础封装库
License: MIT
Requires Python: >=3.6
Keywords: mysql, asyncio, crud, session

# fessql
MySQL数据库异步crud，Faster, easier, simpler coding，同步支持flask、异步支持sanic


# Installing fessql
- 对于sanic异步框架安装
    - ```pip install fessql[sanic]```

- 对于flask同步框架安装
    - ```pip install fessql[flask]```

- 对于fastapi同步框架安装
    - ```pip install fessql[fastapi]```

# Usage
### 后续陆续添加.