semvec/pypi-packages huggingface dataset:
flask-logfile 0.0.2
一个高可用的Flask日志文件插件

# flask-logfile

一个高可用的Flask日志文件插件

## 安装

```
pip install flask_logfile
```

## 示例

```
import logging

from flask import Flask
from flask_logfile import LogFile


app = Flask(__name__)

app.config['LOG_LEVEL'] = logging.INFO
app.config['LOG_FILE'] = '`logs/main.log`'

LogFile().init_app(app)

app.logger.debug('debug')
app.logger.info('info')
app.logger.warning('warning')
app.logger.error('error')
```

## 配置说明

| 配置变量                  | 功能说明                                                                                                 |
| ------------------------- | -------------------------------------------------------------------------------------------------------- |
| LOG_LEVEL                 | 日志等级，同logging模块，默认：`DEBUG`                                                                 |
| LOG_DATE_FORMAT           | 日志时间格式，默认：`%Y-%m-%d %H:%M:%S`                                                                |
| LOG_STREAM_FORMAT | 控制台日志格式，可参考[官方文档](https://docs.python.org/3.7/library/logging.html#logrecord-attributes)|
| LOG_FILE           | 日志文件路径，默认：`logs/flask.log`                                                                |
| LOG_FILE_ENCODING                 | 日志文件编码，默认：`utf8`                                                                 |
| LOG_FILE_FORMAT           | 日志文件日志格式，可参考[官方文档](https://docs.python.org/3.7/library/logging.html#logrecord-attributes)                                                                |
|LOG_FILE_SPLIT_UNIT                 | 日志文件拆分时间单位，默认：`d`（天）                                                               |
|FILE_SPLIT_INTERVAL           | 日志文件拆分间隔，默认：`1`个时间单元                                                         |
|LOG_FILE_BACKUP_COUNT                 | 日志文件备份数量，默认：0|
local-text-summarizer 0.2
A package for simple local text summarization.

# Text Summarizer

A Python package for simple local text summarization with nltk.

## Installation

```
pip install local_text_summarizer
```


## Usage

I mostly use this for limiting token upload with expensive LLM API's. So this way I can get the gist of the text and send the condensed version to the API. 

FOR 0.1
IMPORTANT I MADE A SMALL SPELLING MISTAKE WITH THE FIRST VERSION 
TO USE 0.1
from locat_text_summarizer import condense_story
locat NOT local.

THIS HAS BEEN FIXED IN 0.2

Here is a simple example of how to use the `local_text_summarizer` package to condense a story:

```python
from local_text_summarizer import condense_story

text = """
**The Little Boat's Big Adventure**

Once upon a time, in a small marina, there was a little boat named Luna. Luna was a sturdy sailboat with a white hull and a bright blue sail. She had been sitting in the marina for a while, waiting for her next adventure.

One day, a young couple, Alex and Maddie, came to the marina looking for a boat to rent. They had always dreamed of sailing around the world, but for now, they were just looking for a day trip. As they walked down the dock, they noticed Luna, and their eyes lit up. "She's perfect!" Alex exclaimed. Maddie nodded in agreement. "Let's take her out!"

The marina owner, a grizzled old sailor named Jack, helped them prepare Luna for the trip. He showed them the ropes, literally, and gave them a quick sailing lesson. As they set off into the open water, Luna felt the wind in her sail and the sun on her deck. She was finally free!

Alex and Maddie laughed and chatted as they sailed across the bay, taking in the sights and sounds of the ocean. As they approached a small island, they decided to drop anchor and explore. Luna bobbed gently in the water as they swam ashore and discovered a hidden cove, teeming with sea life.

As the day drew to a close, Alex and Maddie reluctantly climbed back on board. As they sailed back to the marina, Luna felt grateful for the adventure she had shared with the young couple. She knew she would always be ready for the next big adventure that came her way.

From that day on, Luna became the go-to boat for many more exciting journeys, and her legend grew as the little boat with a big heart and a love for the open sea.
"""

# Summarize the text
summary = condense_story(text, ratio=0.3)
print("Summary:")
print(summary)

we go from 1622 to 678

**The Little Boat's Big Adventure**
Once upon a time, in a small marina, there was a little boat named Luna. One day, a young couple, Alex and Maddie, came to the marina looking for a boat to rent.
ripplegw 0.0.9
A small jax package for differentiable and fast gravitational wave data analysis.
Requires Python: >=3.9
Keywords: gravitational waves, jax

# Ripple :ocean:

A small `jax` package for differentiable and fast gravitational wave data analysis.

# Getting Started

### Installation

Both waveforms have been tested extensively and match `lalsuite` implementations to machine precision across all the parameter space. 

Ripple can be installed using 

```
pip3 install ripplegw
```

Note that by default we do not include enable float64 in `jax`` since we want allow users to use float32 to improve performance.
If you require float64, please include the following code at the start of the script:

```
from jax import config
config.update("jax_enable_x64", True)
```

See https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html for other common `jax` gotchas.

### Supported waveforms

- IMRPhenomXAS (aligned spin)
- IMRPhenomD (aligned spin)
- IMRPhenomPv2 (Still finalizing sampling checks)
- TaylorF2 with tidal effects
- IMRPhenomD_NRTidalv2, verified for the low spin regime (chi1, chi2 < 0.05), further testing is required for higher spins

### Generating a waveform and its derivative

Generating a waveform is incredibly easy. Below is an example of calling the PhenomXAS waveform model
to get the h_+ and h_x polarizations of the waveform model

We start with some basic imports:

```python
import jax.numpy as jnp

from ripple.waveforms import IMRPhenomXAS
from ripple import ms_to_Mc_eta
```

And now we can just set the parameters and call the waveform!

```python
# Get a frequency domain waveform
# source parameters

m1_msun = 20.0 # In solar masses
m2_msun = 19.0
chi1 = 0.5 # Dimensionless spin
chi2 = -0.5
tc = 0.0 # Time of coalescence in seconds
phic = 0.0 # Time of coalescence
dist_mpc = 440 # Distance to source in Mpc
inclination = 0.0 # Inclination Angle

# The PhenomD waveform model is parameterized with the chirp mass and symmetric mass ratio
Mc, eta = ms_to_Mc_eta(jnp.array([m1_msun, m2_msun]))

# These are the parametrs that go into the waveform generator
# Note that JAX does not give index errors, so if you pass in the
# the wrong array it will behave strangely
theta_ripple = jnp.array([Mc, eta, chi1, chi2, dist_mpc, tc, phic, inclination])

# Now we need to generate the frequency grid
f_l = 24
f_u = 512
del_f = 0.01
fs = jnp.arange(f_l, f_u, del_f)
f_ref = f_l

# And finally lets generate the waveform!
hp_ripple, hc_ripple = IMRPhenomXAS.gen_IMRPhenomXAS_hphc(fs, theta_ripple, f_ref)

# Note that we have not internally jitted the functions since this would
# introduce an annoying overhead each time the user evaluated the function with a different length frequency array
# We therefore recommend that the user jit the function themselves to accelerate evaluations. For example:

import jax

@jax.jit
def waveform(theta):
    return IMRPhenomXAS.gen_IMRPhenomXAS_hphc(fs, theta)
```
onstats 0.9.4
Online stats in python, based in generators with send
Requires Python: <4.0,>=3.9

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Tests Status](./reports/coverage/coverage-badge.svg?dummy=8484744)](./reports/junit/report.html)

## Generators Based Online Statistics

This package implement online statistics written using python generators, with the only depencency of numpy.

It can calculate basic stats in an online manner with good stability.

The Repo focus in simplicity and compousability, reliying 100% on python Generators.

By desingn window operations increase in window size till the desired size instead of returning Nan in the initialization period as pd.rolling does.

## install

> poetry add onstats

> pip install onstats

## How to use:

Import the window / rolling statistic you want to compute and send the values to it:

```python
>>>  from onstats.stats import ma # moving average
>>>  from onstats.util import send

>>>  gma = ma(2)  # with window 2
>>>  gma.send(3)
3
>>>  gma.send(5)
4
>>>  gma.send(5)
5
```

If w = 0 the window is infinitelly large , we will compute the normal average.

You can also feed all the iterator directly:


```python
>>>  gma = ma(2)  # with window 2
>>>  send(gma, [3,5,5])
5
```

Or as an iterator

```python

>>>  gma = ma(2)  # with window 2
>>>  for d in isend(gma, [3,5,5]):
>>>     print(d)
3
4
5
```

You can also pass 2d np.arrays:

```python

>>>  gma = ma(2)  # with window 2
>>>  for d in isend(gma, np.array([[0,0],[1,2],[1,4]])):
>>>     print(d)
[0,0]
[0.5,1]
[1,3]
```


## Supported Stats:

| rolling   | window | infinite | Ddoff | Description                |
|-----------|--------|----------|-------|----------------------------|
| ma        | ✅     | ✅       |       | Moving Average             |
| ema       |        | ✅       |       | Exponential Moving Average |
| var       | ✅     | ✅       | ✅    | Variance                   |
| ath       |        | ✅       |       | All Time High              |
| wsum      | ✅     | ✅       |       | Windowed Sum               |
| cov_xy    | ✅     |          | ✅    | Covariance                 |
| corr_xy   | ✅     |          | ✅    | Correlation                |
| auto_corr | ✅     |          | ✅    | Auto Correlation           |