semvec/pypi-packages huggingface dataset:
olivepy 0.0.1
A python inliner tool for shell script
Requires Python: >=3.8

# olivepy

This is a tool used to process data directly from the shell using python.

It was developed to wrap some basic functionality such as list and type casting, imports, line by line parsing etc.

```quote
The olive python (Liasis olivaceus) is a species of snake in the family Pythonidae.
```

## Usage

A very basic example of `olivepy` parses an input string as an integer

```shell
$ printf '0x123' | olivepy -t int
291

$ printf '0b1010' | olivepy -t int
10
```

Another simple example shows the input parsed as a list of integers

```shell
$ printf '0x123 0x345' | olivepy -t int --list
[291, 837]
```

You can also set a delimiter for splitting the string into a list

```shell
$ printf '0x123:0x345' | olivepy -t int --list -d ':'
[291, 837]
```

The result of the input parsing is placed in the `_` variable. The remaining arguments are used as the body of a lambda function and the result is returned

```shell
$ printf '0x123 0x345' | olivepy -t int --list 'hex(sum(_))'
0x468
```

If you wish to run multiple commands separated by line, lambda can be problematic. In this case you can use a normal named function (The function name `__f__` so avoid overriding it).

```shell
$ printf '0x123 0x345' | olivepy -t int --list -f 's = sum(_); l = len(_); return s/l'
564.0
```

You can also import libraries using a comma separated list. Use : to import from and ! to import as.

```shell
$ printf '{"cmd": "ls"}' | olivepy --import 'os:system!s,json:loads' 's(loads(_).get("cmd"))'
LICENSE        README.md      __pycache__    pyproject.toml src            tests
0
```

As you can see in the above example, the lambda function returned a value of 0 and it was printed in the output. If you wish tou have the command executed in the main body use the `--main` flag.

```shell
$ printf '{"cmd": "ls"}' | olivepy --import 'os:system!s,json:loads' -m 's(loads(_).get("cmd"))'
LICENSE        README.md      __pycache__    pyproject.toml src            tests
```

If you wish to run the commands line by line instead of on the entire input, you can use the `--line` option.

```shell
$ printf '123\n124\n' | olivepy -l -t int '_ + 1'
124
125
```

You can use the `--pre` and `--post` options to set some code to run before and after the main body

```shell
$ printf '123\n124\n' | olivepy -l -t int -m --pre 'x=111' --post 'print(x)' 'x += _'
358
```

```shell
$ printf '123 124\n' | olivepy -t int -m -l --list -d ' ' --pre 'b = 123' --post 'print(b + sum(a))' 'a = [x+2 for x in _]'
374
```
airqloudanalysis 0.0.733
This is used for analyzing the obtain from IoT AirQo devices
Keywords: python, IoT, AirQo, data, analysis, insights

# AirQloud Analysis

A Python library for analyzing data from IoT AirQo devices to provide insights on sensor health, device uptime, data completeness, and more.

## Installation

```bash
pip install airqloudanalysis
```

## Features

- Sensor health analysis
- Device uptime monitoring
- Data completeness metrics
- Battery performance analysis
- Support for device-specific and AirQloud-level analysis


## Noticable changes to this library
Library version change
The library version holds various changes to the following functions;
## print_devices_with_time_diff_flag_zero
This function has been replaced by the offline and online fuctions as they are more descriptive

### Calculate_uptime
Altered to use start and end date to fill in the null while computing the collective uptime  and now takes in two extra parameters: start and end date 
    Function call is calculate_uptime(dataframe df, string start, string end)

### Online devices list 
This provides a variation of the timeLastPost function providing a list of online devices, their device numbers, time difference, and the airqlouds they belong to
    Function call is onlineDeviceList(dataframe df):

### Offline devices list
This provides a variation of the timeLastPost function providing a list of offline devices, their device numbers, time difference, and the airqlouds they belong to
    Function call is offlineDeviceList(dataframe df):

## Usage
These are the essential functions used both in general and device specific analysis
```python
import airqloudanalysis as aqa

# Initialize with your API token
token = "your_api_token"
for google sheets
file_path = "file path"

airQlouds = ["Kampala", "Nairobi"]
or 
deviceNames = ['aq_g4_95', 'aq_23']

start = "2023-01-01"
end = "2023-01-31"
maintenenceDate = date(2025, 3, 1)


# Get device data
AQData = aqa.airqloudlist(file_path, excel_file, airQlouds, deviceNames)

#Initialisation of the data frame
final_df = aqa.process_data(AQData, start, end)

#List of devices and last post
device_time_diff = aqa.timeLastPost(AQData)

#List of online devices
onlineDeviceList = aqa.onlineDeviceList(device_time_diff)

#List of offline devices
offlineDeviceList = aqa.offlineDeviceList(device_time_diff)

#Calculating the uptime
final_uptime_data = aqa.calculate_uptime(final_df, start, end)

# Calculate uptime
uptime_data = aqa.calculate_uptime(processed_data, start, end)

```

## Full Documentation

For complete documentation and examples, please visit:
https://docs.google.com/document/d/1Dc4zQceYjoXDwmHKy99hp7x49kq8LtoSAXBA-1HMwA4/edit?usp=sharing

The repository for this library 
https://github.com/OlukaGibson/deviceAnalysisLibrary.git

## License

This project is licensed under the terms of the license included in the repository.

## Author

- AirQo - <gibson@airqo.net>
ucdp-uvm 0.1.1
Unified Chip Design Environment - Unified Verification Methodology
Requires Python: <4.0,>=3.10.0

[![PyPI Version](https://badge.fury.io/py/ucdp-uvm.svg)](https://badge.fury.io/py/ucdp-uvm)
[![Python Build](https://github.com/nbiotcloud/ucdp-uvm/actions/workflows/main.yml/badge.svg)](https://github.com/nbiotcloud/ucdp-uvm/actions/workflows/main.yml)
[![Documentation](https://readthedocs.org/projects/ucdp-uvm/badge/?version=stable)](https://ucdp-uvm.readthedocs.io/en/stable/?badge=stable)
[![Coverage Status](https://coveralls.io/repos/github/nbiotcloud/ucdp-uvm/badge.svg?branch=main)](https://coveralls.io/github/nbiotcloud/ucdp-uvm?branch=main)
[![python-versions](https://img.shields.io/pypi/pyversions/ucdp-uvm.svg)](https://pypi.python.org/pypi/ucdp-uvm)

# Unified Chip Design Environment - Unified Verification Methodology

* [Documentation](https://ucdp-uvm.readthedocs.io/en/stable/)
* [PyPI](https://pypi.org/project/ucdp-uvm/)
* [Sources](https://github.com/nbiotcloud/ucdp-uvm)
* [Issues](https://github.com/nbiotcloud/ucdp-uvm/issues)

## Installation

Installing it is pretty easy:

```bash
pip install ucdp-uvm
```