semvec/pypi-packages huggingface dataset:
gzip-utils 2020.7.15
Package with diffrent gzip-util's
License: MIT
Requires Python: >=3.6,<4.0
Keywords: gzip,utils,json

# Gzip Utilities for Python

[![Build Status](https://dev.azure.com/eossu/public/_apis/build/status/Eossu.gzip-utils?branchName=master)](https://dev.azure.com/eossu/public/_build/latest?definitionId=2&branchName=master)

This is a repository to hold diffrent utilities for gzip.

## Utilities

- [Compressed JSON List](docs/utils/compressed_json_list.md)
durations-nlp 1.0.1
A python durations parsing library.
License: MIT
Requires Python: >=3.6,<4.0

# durations_nlp

[![CircleCI](https://circleci.com/gh/timwedde/durations_nlp.svg?style=svg)](https://circleci.com/gh/timwedde/durations_nlp)
[![codecov](https://codecov.io/gh/timwedde/durations_nlp/branch/master/graph/badge.svg)](https://codecov.io/gh/timwedde/durations_nlp)
[![Downloads](https://pepy.tech/badge/durations-nlp)](https://pepy.tech/project/durations-nlp)

A python durations parsing library, providing a straight-forward API to parse duration string representations such as `1d`, `1 day 2 hours` or `2 days 3h 26m 52s` and convert them to numeric values.

## What and Why
It's easier and more straight forward to read a duration expressed in natural language (at least for a human), as an expression rather than an amount. When writing configuration files for example:

```yaml
interval: 3 hours
```

is easier to understand for a human than

```yaml
interval: 10800  # seconds
```

## Installation

`durations_nlp` can be installed via pip:
```bash
$ pip install durations_nlp
```

## Usage
To parse a duration string representation, just instantiate a Duration object and let it work for you. A Duration representation is composed of as many ``<value><scale>`` pairs as you need to express it:
* A value is an integer amount.
* A scale is a duration unit in it's short or long form (both singular and plural).
* Duration pairs can be separated with sep characters and expressions such as `,` or `and`

### Example Input

* `1d`
* `2 days`
* `2 days and 4 hours`
* `4M, 22d and 6hours`

### Scales Reference

* Century: `c`, `century`, `centuries`
* Decade: `D`, `decade`, `decades`
* Year: `y`, `year`, `Year`
* Month: `M`, `month`, `months`
* Week: `w`, `week`, `weeks`
* Day: `d`, `day`, `days`
* Hour: `h`, `hour`, `hours`
* Minute:`m`, `minute`, `minutes`
* Second: `s`, `second`, `seconds`
* Millisecond: `ms`, `millisecond`, `milliseconds`

### Usage Example

```python
from durations_nlp import Duration

one_hour = "1hour"

one_hour_duration = Duration(one_hour)
one_hour_duration.to_seconds()
# >>> 3600.0
one_hour_duration.to_minutes()
# >>> 60.0

# You can even compose durations in their short
# and long variations
two_days_three_hours = "2 days, 3h"
two_days_three_hours_duration = Duration(two_days_three_hours)
two_days_three_hours_duration.to_seconds()
# >>> 183600.0
two_days_three_hours_duration.to_hours()
# >>> 51.0
```
jsonflattifier 1.1.6
Converts a JSON Document with nested objects and their parameters to the JSON Document with Flat Denormalised Data.
License: MIT
Requires Python: >=3.6
Keywords: json csv flat flattify flatten table convert denormalise combinations

# jsonflattifier

Converts a JSON Document with nested objects and their parameters to the JSON Document with Flat Denormalised Data.

**Installation**

```shell
> pip install jsonflattifier
```

**Input**

```json
{
  "name": "John",
  "has": [
    "apple",
    "peach"
  ]
}
```

**Get flat JSON**

```shell
> python3 -m jsonflattifier flattify '{"name":"John","has":["apple","peach"]}' --json --jsonpath-keys --no-table
```

```json
[
  {
    "$['name']": "John",
    "$['has'][0]": "apple"
  },
  {
    "$['name']": "John",
    "$['has'][1]": "peach"
  }
]
```

**Get CSV**

```shell
> python3 -m jsonflattifier flattify '{"name":"John","has":["apple","peach"]}' --csv --no-table
```

```csv
['name'],['has']
John,apple
John,peach
```

**Print Table**

```shell
> python3 -m jsonflattifier flattify '{"name":"John","has":["apple","peach"]}'
```

| ['name'] | ['has'] |
| -------- | ------- |
| John     | apple   |
| John     | peach   |

2 rows in set


**More Examples**

https://gitlab.com/v.grigoryevskiy/json-flattifier/-/tree/master/tests/data